Tighten regexp for rust-ts-mode keyword workaround
authorYuan Fu <casouri@gmail.com>
Thu, 2 May 2024 04:50:21 +0000 (21:50 -0700)
committerYuan Fu <casouri@gmail.com>
Thu, 2 May 2024 04:50:21 +0000 (21:50 -0700)
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add bos and eos.

lisp/progmodes/rust-ts-mode.el

index 7bc05898d15640a85822244ac25a2dc3e397c369..baf0e1ec013f9994466c503f592a884146eae0f8 100644 (file)
@@ -217,7 +217,7 @@ to be checked as its standard input."
      ;; If these keyword are in a macro body, they're marked as
      ;; identifiers.
      ((identifier) @font-lock-keyword-face
-      (:match ,(rx (or "else" "in" "move")) @font-lock-keyword-face)))
+      (:match ,(rx bos (or "else" "in" "move") eos) @font-lock-keyword-face)))
 
    :language 'rust
    :feature 'number