| Age | Commit message (Collapse) | Author |
|
|
|
As mentioned in (info "(emacs)Defining Faces") the name of a face
> should not end in "-face" (that would be redundant).
For historic reasons a few built-in faces actually do end with
"-face" and it so happens that our faces are closely related to
just those `font-lock' faces and that probably inspired our use
of the suffix. Even so, we should stop now.
|
|
This allows to jump to code references such as lines 82 and 132 in the
following snippet error message.
error[E0061]: this function takes 1 parameter but 2 parameters were supplied
--> file6.rs:132:34
|
82 | fn duration_ms_since(time: &Option<SystemTime>) -> u128 {
| ------------------------------------------------------- defined here
...
132 | self.total_time_ms = duration_ms_since(&self.program_start, 2);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
‘compilation-face’ is defined in the ‘compile’ library, so we should ‘require’
that library.
|
|
- Migrate to lexical binding.
- Declare functions that are conditionally-defined.
- Migrate off the deprecated ‘cl’ library.
- Don’t use ‘setq’ to introduce global variables and constants.
- Avoid “unused lexical variable” warnings.
- Remove some unused variables.
- Stop using interactive-only commands.
|
|
rust-in-macro could cause significant performance problems resulting
in a very choppy user experience. Reimplement rust-in macro in a
somewhat simpler manner and in way which allows both allows
restriction to parts of the buffer and caching of buffer analysis.
Optimize rust-syntax-propertize to use this caching mechanism.
Fixes #208
Fixes #288
|
|
|
|
|
|
|
|
|
|
see `Key Binding Conventions' in the Emacs manual.
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
|
|
Fixes the following problem: consider code
fn foo(a: u32, b : u32) {}
Here, `b` was not highlighted as a variable, because the regex didn't
take into account possible space before the colon.
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
|
|
|
|
|
|
because emacs 24 doesn't know about font-lock-ensure
|
|
|
|
|
|
This preserves as default (t), the current indentation behavior of `->
ReturnType` when found on its own line: indenting as per the arguments
of the above function. When disabled (nil) by the user, however, this
will now just indent such a line one level from base-line (e.g. no
special treatment).
Includes a basic test.
|
|
|
|
Fixes #271
|
|
|
|
Improved font-locking for print macros
|
|
|
|
|
|
These went away pre Rust-1.0 and are valid identifiers. Went ahead and
removed them from the tests as well, replacing them with real types of
the same number of characters.
|
|
|
|
|
|
rust-mode identifies the "<<" as open angle brackets in
let x = a[i][(1 << i)];
This patch fixes the problem by changing rust-is-in-expression-context
to treat "]" as starting an expression in brace context.
Fixes #212
|
|
|
|
Highlight interpolation in arguments to print! &c.
|
|
Change rust-beginning-of-defun to keep searching when it stops in a
comment or a string. Fixes #222.
|
|
|
|
`union` is a contextual keyword, so highlight it in the correct
context. Otherwise, treat `union` similarly to `struct`.
|
|
|
|
|
|
|
|
|
|
Add context-sensitive fontification for the "default" keyword.
|
|
This patch fixes a bug I found where rust-mode would misindent code
like:
fn each_split_within<'a, F>(ss: &'a str, lim: usize, mut it: F)
-> bool where F: FnMut(&'a str) -> bool {
}
fn test_split_within() {
}
In particular the second "fn" would be indented a level.
On the "fn" line, rust-mode-indent-line was calling
rust-beginning-of-defun, which would go to the previous defun. Fixing
this required moving the definition of rust-top-item-beg-re higher in
the file, before its first use (recent versions of Emacs insist on
this). And, this required removing the "^" from this regexp, which is
ok because the sole use is already adding a "^". Additionally, I moved
the "\\_>" into the regexp, rather than have it added at the point of
use, so that the new use would also benefit.
This patch includes two new test cases.
|
|
fix syntax of "<" appearing after "?"
|
|
Syntax propertize
|
|
The "<" syntax-setting code could be confused after a "?". This patch
changes the code to treat "?" as an "ambiguous operator" and adjust
according to further context.
Fixes #200
|
|
Set open-paren-in-column-0-is-defun-start to nil in rust-mode. This
setting is a performance hack in Emacs, at the expense of correctness in
some cases. However, due to the syntax-ppss cache, I doubt whether this
hack is needed for Rust code.
Fixes #107
|