auto merge of #20894 : swgillespie/rust/emacs-issue-20422, r=pnkfelix

rust-mode.el recently started highlighting keywords that were substrings of identifiers. Identifiers such as `xyz_type` would have `type` highlighted, which isn't normal. This patch re-introduces `_` as a word constituent, so that keywords following a `_` don't get syntax highlighted as keywords. Fixes issue #20422
This commit is contained in:
bors 2015-01-12 19:20:56 +00:00
commit 3a44a19af2

View File

@ -31,6 +31,11 @@
(modify-syntax-entry ?\" "\"" table)
(modify-syntax-entry ?\\ "\\" table)
;; mark _ as a word constituent so that identifiers
;; such as xyz_type don't cause type to be highlighted
;; as a keyword
(modify-syntax-entry ?_ "w" table)
;; Comments
(modify-syntax-entry ?/ ". 124b" table)
(modify-syntax-entry ?* ". 23" table)