about summary refs log tree commit diff
path: root/src/etc/emacs
AgeCommit message (Collapse)AuthorLines
2015-01-29Pull configs out into individual repositoriesSteve Klabnik-1509/+0
As we grow, these don't belong in-tree. http://internals.rust-lang.org/t/moving-editor-highlighting-into-their-own-repos/1395 * https://github.com/rust-lang/rust.vim * https://github.com/rust-lang/rust-mode * https://github.com/rust-lang/gedit-config * https://github.com/rust-lang/kate-config * https://github.com/rust-lang/nano-config * https://github.com/rust-lang/zsh-config
2015-01-21rollup merge of #19913: KOMON/rust-mode-emacs-indentationAlex Crichton-3/+30
I added an option to auto-indent method chains to line up along their '.' operators. Like so: ``` let input = io::stdin().readline() .ok() .expect("Failed to read line"); ``` The old default would indent like so: ``` let input = io::stdin().readme() .ok() .expect("Failed to read line"); ``` The Rust guide explicitly condones the former, so I thought it would be nice for the emacs mode to support it. It's off by default, you have to set ```rust-indent-method-chain``` to ```t``` via your .emacs or the customize menu
2015-01-20Changed rust-mode code for tabs -> spacesDaniel Raloff-20/+20
2015-01-09Mark _ as a word constituent to avoid highlighting parts of identifiers as ↵Sean Gillespie-0/+5
keywords
2015-01-07Update editor syntax files for isize/usize.Huon Wilson-1/+1
Yay, syntax highlighting.
2014-12-16added optional method chain indentations for emacs major modeDaniel Raloff-1/+28
2014-12-14Update emacs and vi modes.Niko Matsakis-1/+1
2014-11-16rust-mode.el: Tweak syntax tableRoy Crihfield-4/+1
"_" should keep the default syntax class (symbol, not word). This allows, e.g., `forward-word' to behave in the familiar way, jumping to underscores within a function or variable name.
2014-11-10Add 'move' keyword to emacs, kate, and vim editor modes.Sean Gillespie-1/+1
2014-10-25Fix spelling mistakes in comments.Joseph Crail-1/+1
2014-09-29Replaced some TODO by FIXMEgamazeps-1/+1
closes #17478
2014-08-17Add new keywords (particularly `where` & `virtual`) to editor modes.Huon Wilson-2/+3
2014-06-17emacs: Remove outdated references to ~ in testsTom Jakubowski-3/+3
2014-06-17emacs: Add shebang to test scriptTom Jakubowski-0/+1
2014-06-17emacs: Don't overwrite font lock for attributesTom Jakubowski-27/+87
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.
2014-06-17auto merge of #14818 : tomjakubowski/rust/emacs-attributes-key-value, r=pnkfelixbors-3/+3
This addresses two problems noted in #14347: the highlight of `#foo]` as an attribute, and the non-highlight of `#[foo = "bar"]`.
2014-06-16Update repo locationBrian Anderson-1/+1
2014-06-11emacs: highlight `#[foo = "bar"]` attributesTom Jakubowski-2/+2
Setting `OVERRIDE` to `t` overrides the conflicting highlight Emacs places on string literals. Fix #14347
2014-06-11emacs: do not highlight `#foo]` as an attributeTom Jakubowski-1/+1
part of #14347
2014-05-12emacs: highlight `macro_name!` in macro invocations using [] delimitersHuon Wilson-1/+1
2014-05-12auto merge of #13922 : Rufflewind/rust/patch-1, r=pnkfelixbors-5/+5
Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of setq is more appropriate here (and also silences compilation warnings).
2014-05-03Recommend autoload instead of requirePhil Ruffwind-3/+4
Lazy loading with autoload will result in faster startup time for Emacs users and is generally the recommended approach for major modes.
2014-05-03Use defvar for rust-top-item-beg-re insteadPhil Ruffwind-5/+5
Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of setq is more appropriate here (and also silences compilation warnings).
2014-05-02emacs: Add 'box' to keywordsBrian Anderson-1/+1
2014-04-09rust-mode cleanup.Rüdiger Sonderfeld-51/+58
* Use `setq-local' instead of (set (make-local-variable ...) value). Provides a version for older Emacsen. * Remove use of `cl.el'. * Use \' in file regexp instead of line end match $. * Use type for defcustom and add parent group.
2014-04-04etc: attempts at fixing editor highlighting for new attribute syntaxCorey Richardson-1/+1
2014-04-03Update emacs mode to support new `#![inner(attribute)]` syntax.Felix S. Klock II-2/+2
2014-03-12Emacs: always jump the cursor if needed on indentMicah Chalmer-9/+50
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.
2014-03-02Emacs: Remove README warning of old whitespace bugMicah Chalmer-5/+0
The incompatibility of rust-mode with global-whitespace-mode warned about in the README was actually fixed by commit 581b3db3b3. Remove the warning from the README and close #3994.
2014-02-22Fix typo in emacs ERT testMicah Chalmer-1/+1
2014-02-22Emacs: indent relative to enclosing blockMicah Chalmer-37/+127
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... })
2014-02-22Emacs: stay at the correct position when indentingMicah Chalmer-9/+74
When indenting a non-blank line, stay at the same cursor position relative to the content after indenting.
2014-02-22Fix emacs indentation of multi-line match patternsMicah Chalmer-3/+40
Aligns to the same column if the previous line ends in a single '|' (but not a '||').
2014-02-17Added more scripts to tidy checkDerek Guenther-0/+10
2014-02-14extern mod => extern crateAlex Crichton-3/+2
This was previously implemented, and it just needed a snapshot to go through
2014-02-14Add crate to emacs and kate modefilesKevin Ballard-0/+1
2013-12-31Fix rust-align-to-expr-after-brace, closes #11239.John Louis Walker-1/+3
forward-to-word is undefined, and so Emacs would throw errors in rust-align-to-expr-after-brace. This change yields the expected behavior discussed in the issue.
2013-12-14Add "proc" as keyword to emacs modeMicah Chalmer-1/+1
2013-12-09Add defun motions for rust-mode.S Pradeep Kumar-25/+269
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
2013-12-04Add Imenu support for rust-mode.S Pradeep Kumar-18/+33
+ Delete trailing whitespace.
2013-09-28Fix single-line-style paragraph fills with code immediately before or afterMicah Chalmer-1/+31
2013-09-26Add 'continue' keyword to emacs, vim, gedit, kateBrian Anderson-0/+1
2013-09-13Minor cleanup and formatting tweaks to the rust-mode READMELindsey Kuper-25/+28
2013-09-07Cover all cases for padding in paragraph fills as intendedMicah Chalmer-14/+19
2013-09-07Fix regression of multi-line statement indentsMicah Chalmer-23/+36
2013-09-06Add ERT testsMicah Chalmer-0/+389
2013-09-06Add paragraph fill and auto-fill for multi-line commentsMicah Chalmer-1/+123
2013-09-06Add custom group for rust-modeMicah Chalmer-1/+5
2013-09-06Indent return type to align with argumentsMicah Chalmer-2/+5
2013-09-06Allow indenting to align struct fields after curly braceMicah Chalmer-17/+14