From 2a407f179821f84a544cf19aaf777dd92eb7fd22 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Wed, 1 May 2024 21:50:21 -0700 Subject: [PATCH] Tighten regexp for rust-ts-mode keyword workaround * 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 7bc05898d15..baf0e1ec013 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -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 -- 2.39.5