[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 5d0fce5 149/486: Fix word and symbol syntax dist
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 5d0fce5 149/486: Fix word and symbol syntax distinction |
Date: |
Sat, 7 Aug 2021 09:25:08 -0400 (EDT) |
branch: elpa/rust-mode
commit 5d0fce59c71f66e7d11469dc9264817d37f51028
Author: Roy Crihfield <rscrihf@gmail.com>
Commit: Felix S. Klock II <pnkfelix@pnkfx.org>
Fix word and symbol syntax distinction
By passing 'symbols as 2nd argument to regexp-opt, keywords will not be
erroneously matched inside symbols. This obviates changing the syntax of
`_' to "w".
---
rust-mode.el | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/rust-mode.el b/rust-mode.el
index 290dd6b..856ee5a 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -32,11 +32,6 @@
(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)
@@ -335,10 +330,10 @@
(append
`(
;; Keywords proper
- (,(regexp-opt rust-mode-keywords 'words) . font-lock-keyword-face)
+ (,(regexp-opt rust-mode-keywords 'symbols) . font-lock-keyword-face)
;; Special types
- (,(regexp-opt rust-special-types 'words) . font-lock-type-face)
+ (,(regexp-opt rust-special-types 'symbols) . font-lock-type-face)
;; Attributes like `#[bar(baz)]` or `#![bar(baz)]` or `#[bar = "baz"]`
(,(rust-re-grab (concat "#\\!?\\[" rust-re-ident "[^]]*\\]"))
- [nongnu] elpa/rust-mode 66438d4 108/486: Merge pull request #2 from MicahChalmer/fix-quotes-with-syntax-properties, (continued)
- [nongnu] elpa/rust-mode 66438d4 108/486: Merge pull request #2 from MicahChalmer/fix-quotes-with-syntax-properties, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f0d4c25 109/486: Fix aligning of method chains (more-or-less) and add various unit tests., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode fd92bfd 111/486: Merge pull request #17 from ramnes/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 149cfdd 106/486: Merge pull request #20 from pnkfelix/fix-broken-tests, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 81d0680 118/486: Fix ERT section of README, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2038365 120/486: Fix bug in rust-indent-method-chains, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode fea20e7 131/486: Include the last character in indentation tests, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2e7c6dc 128/486: Add test for raw string with inner quote and hash, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode eaa332e 143/486: Add rust-playpen-buffer and rust-playpen-region for sharing code., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 054a11c 157/486: Update rust-mode URL in header, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5d0fce5 149/486: Fix word and symbol syntax distinction,
ELPA Syncer <=
- [nongnu] elpa/rust-mode cb5781d 142/486: Merge pull request #46 from MicahChalmer/fix-fill-region, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1be7a94 154/486: Merge pull request #57 from pnkfelix/regression-test-for-arrow-openbrace, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 493cc99 148/486: Merge pull request #52 from GBGamer/fix-indent, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ded5ef7 155/486: Pass explicit second argument to looking-back, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6d5b02e 153/486: Merge pull request #56 from pnkfelix/pr=fix-word-syntax, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 96f7f79 156/486: Fix free-variable warnings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8eb6029 165/486: handle case where blink-matching-paren-distance is nil, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 3798c7e 167/486: fix quoting in two doc strings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 78e8b08 163/486: Merge pull request #62 from MicahChalmer/a-couple-of-readme-fixes, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6e72f64 176/486: Fix bugs in raw strings and character literals, ELPA Syncer, 2021/08/07