From: Yuan Fu Date: Thu, 2 May 2024 04:50:21 +0000 (-0700) Subject: Tighten regexp for rust-ts-mode keyword workaround X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2a407f179821f84a544cf19aaf777dd92eb7fd22;p=emacs.git 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) --- 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