mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-14 21:16:50 +00:00
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:
commit
3a44a19af2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user