| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix aligning of method chains (more-or-less), add various unit tests, and add matching angle brackets.
|
|
Add travis config (and make tests runnable on emacs 23)
|
|
The regular expressions are probably kind of wrong for things like
self.foo.something::<X>()
.more();
|
|
The new recommended style is to use the "cl-" prefixed versions, but
they do not exist in emacs 23. We still want to stay compatible with
that, so use plain "loop" rather than "cl-loop" to allow the tests to
work with both old and new versions.
ALso "pcase" was introduced in emacs 24, so stop using it to remain
compatible with emacs 23.
|
|
|
|
|
|
This uses syntax properties to make it so that emacs recognizes the
single quote, rather than the double quote, as the string delimiter
within character literals, while leaving the syntax unchanged elsewhere.
|
|
Commit a8fad0f broke the ERT tests by removing trailing whitespace
inside the test strings. Fix the tests, and replace some line endings
inside strings with explicit "\n" to avoid having further significant
trailing whitespace in the code.
|
|
|
|
closes #17478
|
|
|
|
This addresses the font lock regression introduced by the earlier pull
request #14818 - attributes are no longer be highligted inside of comments
and strings.
Also add some font lock test infrastructure and some tests for attribute
font locking.
|
|
The rust-mode-indent-line function had a check, which ran after all the
calculations for how to indent had already happened, that skipped
actually performing the indent if the line was already at the right
indentation.
Because of that, the cursor did not jump to the indentation if the line
wasn't changing. This was particularly annoying if there was nothing
but spaces on the line and you were at the beginning of it--it looked
like the indent just wasn't working.
This removes the check and adds test cases to cover this.
|
|
|
|
This changes the indent to calculate positions relative to the enclosing
block (or braced/parenthesized expression), rather than by an absolute
nesting level within the whole file. This allows things like this to
work:
let x =
match expr {
Pattern => ...
}
With the old method, only one level of nesting would be added within the
match braces, so "Pattern" would have ended up aligned with the match.
The other change is that multiple parens/braces on the same line only
increase the indent once. This is a very common case for passing
closures/procs. The absolute nesting method would do this:
spawn(proc() {
// Indented out two indent levels...
})
whereas the code in this commit does this:
spawn(proc() {
// Indented out only one level...
})
|
|
When indenting a non-blank line, stay at the same cursor position
relative to the content after indenting.
|
|
Aligns to the same column if the previous line ends in a single '|' (but
not a '||').
|
|
Specifically, we can now use:
+ beginning-of-defun
+ end-of-defun
+ mark-defun
where "defun" means a Rust item.
+ Add tests in rust-mode-tests.el
+ Fix indentation in rust-mode-tests.el
+ Add support for trait to Imenu
|
|
|
|
|
|
|
|
|