| Age | Commit message (Collapse) | Author |
|
`union` is a contextual keyword, so highlight it in the correct
context. Otherwise, treat `union` similarly to `struct`.
|
|
Highlight question mark operator using new `rust-question-mark-face'
|
|
|
|
Add `rust-run-clippy' and `rust-buffer-project' with testing paraphernalia
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set `compile-command' in `rust-mode'
|
|
|
|
restore points even when an error occurs
|
|
|
|
Allow formatting with long lines (fixes #186)
|
|
|
|
Add support for "default" keyword
|
|
Add context-sensitive fontification for the "default" keyword.
|
|
|
|
|
|
|
|
|
|
fix rust indentation bug
|
|
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
|
|
Add info to enable rustfmt
|
|
|
|
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
|
|
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
|
|
font-lock-syntactic-keywords have been obsolete since Emacs 24.1, the
earliest version supported by rust-mode. Instead, modes are
encouraged to use syntax-propertize-function.
syntax-propertize-function provides a generally better experience.
Syntax propertization is not tied to font lock,so angle bracket
matching will still work when font-lock is disabled. There's no
longer a need to call font-lock-fontify-buffer or font-lock-ensure
(you can see this in the tests). The resulting code is also shorter.
I removed a few tests:
* font-lock-raw-string-constant was written assuming font-lock based
syntax propertization, but that's no longer the case.
* font-lock-extend-region-in-string and
rust-test-revert-hook-preserves-point both called functions that no
longer exist.
There's a fix for a hidden bug in rust-is-in-expression-context. This
previously could signal in some situations, but the signal was hidden
by font-lock. It was visible now when running tests, hence the new
call to condition-case.
I suspect this might fix #192, but I haven't tried it.
|
|
rust-mode-tests.el uses "&optional &rest" in some function signatures.
This was never really correct, and newer versions of Emacs complain
about it. &rest implies &optional, so removing &optional is all that is
needed.
|
|
Recognize "extern" imenu items
|
|
fix PR link in README
|
|
|
|
Fixes #188.
|
|
Add instructions for version tag update requests
|
|
Recognize imenu items starting with "unsafe"
|
|
handle indirect buffers and multiple windows in rust-format-buffer
|
|
minor cleanups: https links and defcustom grouping
|
|
|
|
|
|
|
|
|
|
|
|
Bump version - this commit will also be added as a version tag.
|
|
|
|
Handle comments when indenting method chains
|