diff options
| author | Yuan Fu | 2024-05-01 21:21:00 -0700 |
|---|---|---|
| committer | Yuan Fu | 2024-05-01 21:26:30 -0700 |
| commit | 07c47ea002b4702285bbf467ec09c9b281eb19b7 (patch) | |
| tree | 646642366385bfd9e4fb5965c7b622397dd468b4 | |
| parent | 0f92d433d2b806eb58a9a4c0197344b08ea5ae65 (diff) | |
| download | emacs-07c47ea002b4702285bbf467ec09c9b281eb19b7.tar.gz emacs-07c47ea002b4702285bbf467ec09c9b281eb19b7.zip | |
Fix fontification for else in macro body in rust-ts-mode
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add a rule for else in macro body. Also added the same rule for "in"
and "move" keyword, as they seems to have the same problem.
| -rw-r--r-- | lisp/progmodes/rust-ts-mode.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 25f1df4a9f9..7bc05898d15 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el | |||
| @@ -213,7 +213,11 @@ to be checked as its standard input." | |||
| 213 | 213 | ||
| 214 | :language 'rust | 214 | :language 'rust |
| 215 | :feature 'keyword | 215 | :feature 'keyword |
| 216 | `([,@rust-ts-mode--keywords] @font-lock-keyword-face) | 216 | `([,@rust-ts-mode--keywords] @font-lock-keyword-face |
| 217 | ;; If these keyword are in a macro body, they're marked as | ||
| 218 | ;; identifiers. | ||
| 219 | ((identifier) @font-lock-keyword-face | ||
| 220 | (:match ,(rx (or "else" "in" "move")) @font-lock-keyword-face))) | ||
| 217 | 221 | ||
| 218 | :language 'rust | 222 | :language 'rust |
| 219 | :feature 'number | 223 | :feature 'number |