Skip to content

Commit 40ffaea

Browse files
committed
auto merge of #5103 : dbaupp/rust/emacs-mode-update, r=graydon
Copy the keyword list from rust.vim, and add `self` so that it is highlighted (being liberal with the correct categories). I'm not quite willing to dive in to clean up the emacs code yet, but at least this gets a (more) modern syntax highlighting list.
2 parents 9616b3d + 4bf94a7 commit 40ffaea

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

src/etc/emacs/rust-mode.el

+9-14
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,17 @@
6666
"trait" "struct" "fn" "enum"
6767
"impl"))
6868
(puthash word 'def table))
69-
(dolist (word '("again" "assert"
70-
"break"
71-
"copy"
72-
"do" "drop"
73-
"else" "export" "extern"
74-
"fail" "for"
75-
"if" "use"
76-
"let" "log" "loop"
77-
"move" "new"
78-
"pure" "pub" "priv"
79-
"ref" "return" "static"
80-
"unchecked" "unsafe"
81-
"while"))
69+
(dolist (word '("as" "break"
70+
"copy" "do" "drop" "else"
71+
"extern" "for" "if" "let" "log"
72+
"loop" "once" "priv" "pub" "pure"
73+
"ref" "return" "static" "unsafe" "use"
74+
"while" "while"
75+
"assert"
76+
"mut"))
8277
(puthash word t table))
8378
(puthash "match" 'alt table)
84-
(dolist (word '("true" "false")) (puthash word 'atom table))
79+
(dolist (word '("self" "true" "false")) (puthash word 'atom table))
8580
table))
8681
;; FIXME type-context keywords
8782

0 commit comments

Comments
 (0)