| Age | Commit message (Collapse) | Author |
|
Correcting highlighting of capitals in function names.
|
|
Support nested block comments
|
|
Previously, code of the form:
fn foo_Bar () {}
would be incorrectly highlighted, because the regex matched on word
boundaries rather than symbol boundaries. Test added.
|
|
remove rust-mode-character-literal-syntax-table
|
|
Fix slow angle bracket matching
|
|
Recognize raw strings all the way to the end of the buffer if they are
not closed. This is not valid rust code, but the highlighting should
show the mistake.
This also eliminates glitchy behavior that can occur in this situation.
Emacs assumes that edits can't change syntax at positions before the
edit, and raw strings without this change violated this.
|
|
The problem was caused by the logic that made it refontify the whole
buffer when "font-lock-syntactically-fontified" was set to a position
before the start of the region to be potentially fontified.
Unfortunately that variable is not reliably set when fontifying a large
buffer. Fortunately, the new logic is much simpler, and font-lock
already takes care of ensuring that everything before font-lock-beg was
syntactically fontified.
The other problem was calling syntax-ppss on positions known not to be
fontified yet.
This fixes both of these issues, and the angle bracket matching now
works on larger buffers without pausing on every keystroke.
|
|
|
|
Cache (regexp-opt rust-special-types 'symbols) in rust-is-lt-char-operator
|
|
regexp-opt is generally intended to be cached, and the extra GC was
causing noticeable lag when typing sometimes.
|
|
Remove unnecessary code with call to undefined function
|
|
|
|
fix quoting in two doc strings
|
|
test $EMACS directly rather than using "which"
|
|
Match angle brackets syntactically
|
|
Add angle brackets to the list of emacs matching characters. Use
syntactic fontification to suppress this where it is not appropriate (in
less than operators, arrows, etc.) Remove the non-syntactic version
that was there previously.
For electric-pair-mode, suppress the pairing for < and > characters that
are not angle brackets.
Because syntax is used for indentation, this fixes some problems with
it, particularly when attempting to stretch type parameter lists over
multiple lines.
|
|
|
|
|
|
Factor out the method of looking for a match for a regexp, but filtering
out some of the matches with a filtering function. This will be used
again for angle bracket filtering.
This also fixes an issue with raw string handling.
|
|
Distinguish face for doc-comments
|
|
Using the syntactic-face-function, we can assign the proper
`font-lock-doc-face' to doc comments ("///", "//!", "/**", "/*!").
Test changes graciously copied from https://github.com/rust-lang/rust-mode/pull/64
|
|
Fixes #33
|
|
Fix multi-line raw strings when editing
|
|
|
|
|
|
Fix #53
|
|
|
|
handle case where blink-matching-paren-distance is nil
|
|
|
|
Match panics during build as compilation warnings
|
|
A couple of readme fixes
|
|
Enables using `cargo test` as the compilation command in emacs, and
adds test failures as compilation warnings.
|
|
|
|
Fixes #48
|
|
Update rust-mode URL in header
|
|
Fix some byte compiler warnings on Emacs 25.1
|
|
|
|
Constant must be defined before being used, to avoid warnings about free
variables
|
|
The second argument to looking-back is no longer optional as of Emacs
25.1.
|
|
Add regression test for PR #52.
|
|
Fix word and symbol syntax distinction, take 2
|
|
Thanks again to @GBGamer !
|
|
|
|
|
|
By passing 'symbols as 2nd argument to regexp-opt, keywords will not be
erroneously matched inside symbols. This obviates changing the syntax of
`_' to "w".
|
|
Fix "-> Type" on a single line indentation
|
|
Use (goto-char (point-max)) instead of (end-of-buffer) to silence warnin...
|
|
Fixes issue #54.
|
|
|
|
Add rust-playpen-buffer and rust-playpen-region for sharing code.
|