From: Mattias EngdegÄrd Date: Tue, 19 Dec 2023 16:07:24 +0000 (+0100) Subject: ; * lisp/progmodes/rust-ts-mode.el: Escape asterisks in regexp. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ade814a2268285475675872760e3c358ec24a130;p=emacs.git ; * lisp/progmodes/rust-ts-mode.el: Escape asterisks in regexp. --- 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)