From f82c75b0a7e7fd56c6915187ce03f0d9f657563a Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Fri, 9 Jan 2015 23:58:34 -0800 Subject: [PATCH] Mark _ as a word constituent to avoid highlighting parts of identifiers as keywords --- src/etc/emacs/rust-mode.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el index 661dc21e2dc5d..f25a59015fcdb 100644 --- a/src/etc/emacs/rust-mode.el +++ b/src/etc/emacs/rust-mode.el @@ -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)