Skip to content

Commit

Permalink
auto merge of #5103 : dbaupp/rust/emacs-mode-update, r=graydon
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Feb 26, 2013
2 parents 9616b3d + 4bf94a7 commit 40ffaea
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions src/etc/emacs/rust-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,17 @@
"trait" "struct" "fn" "enum"
"impl"))
(puthash word 'def table))
(dolist (word '("again" "assert"
"break"
"copy"
"do" "drop"
"else" "export" "extern"
"fail" "for"
"if" "use"
"let" "log" "loop"
"move" "new"
"pure" "pub" "priv"
"ref" "return" "static"
"unchecked" "unsafe"
"while"))
(dolist (word '("as" "break"
"copy" "do" "drop" "else"
"extern" "for" "if" "let" "log"
"loop" "once" "priv" "pub" "pure"
"ref" "return" "static" "unsafe" "use"
"while" "while"
"assert"
"mut"))
(puthash word t table))
(puthash "match" 'alt table)
(dolist (word '("true" "false")) (puthash word 'atom table))
(dolist (word '("self" "true" "false")) (puthash word 'atom table))
table))
;; FIXME type-context keywords

Expand Down

0 comments on commit 40ffaea

Please sign in to comment.