]> git.eshelyaron.com Git - emacs.git/commitdiff
Tighten regexp for rust-ts-mode keyword workaround
authorYuan Fu <casouri@gmail.com>
Thu, 2 May 2024 04:50:21 +0000 (21:50 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 6 May 2024 16:32:16 +0000 (18:32 +0200)
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
Add bos and eos.

(cherry picked from commit bf026b8e55626b35144f93056744f3fd50bc126b)

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