summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorSean Gillespie <sean.william.g@gmail.com>2015-01-09 23:58:34 -0800
committerSean Gillespie <sean.william.g@gmail.com>2015-01-09 23:58:34 -0800
commit186583df52a4c9cece95ba6bb6afc73ed958323e (patch)
treee00c3dfabbd7d96072cfd301da94ed717fbf1ab8 /rust-mode.el
parent4ccac8e304b7b4f9e874870ac32d8fc6d7ce51ce (diff)
downloadrust-mode-186583df52a4c9cece95ba6bb6afc73ed958323e.tar.gz
Mark _ as a word constituent to avoid highlighting parts of identifiers as keywords
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 661dc21..f25a590 100644
--- a/rust-mode.el
+++ b/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)