From ade814a2268285475675872760e3c358ec24a130 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 19 Dec 2023 17:07:24 +0100 Subject: [PATCH] ; * lisp/progmodes/rust-ts-mode.el: Escape asterisks in regexp. --- lisp/progmodes/rust-ts-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index ac860969daf..b4609509798 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -298,7 +298,8 @@ (let* ((beg (treesit-node-start node)) (face (save-excursion (goto-char beg) - (if (looking-at "/\\(?:/\\(?:/[^/]\\|!\\)\\|*\\(?:*[^*/]\\|!\\)\\)" t) + (if (looking-at-p + "/\\(?:/\\(?:/[^/]\\|!\\)\\|\\*\\(?:\\*[^*/]\\|!\\)\\)") 'font-lock-doc-face 'font-lock-comment-face)))) (treesit-fontify-with-override beg (treesit-node-end node) -- 2.39.2