From: Vincenzo Pupillo Date: Sat, 22 Jun 2024 14:22:16 +0000 (+0200) Subject: Fix for grammar change of keyword "virtual" in tree-sitter-cpp X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f6f5ef8273820b3098c8e03e09c225387879536a;p=emacs.git Fix for grammar change of keyword "virtual" in tree-sitter-cpp The new rule works with both the new (>= 0.22.1) and the old (<= 0.22.0) grammar libraries. * lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Removed the keyword "virtual". * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): New font lock rule. (Bug#71518) (cherry picked from commit 014aab9847a0d3d898cb8cbc7224143f2d741abb) --- diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index bef74dd4664..db34339a0fd 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -572,7 +572,7 @@ MODE is either `c' or `cpp'." "not" "not_eq" "operator" "or" "or_eq" "override" "private" "protected" "public" "requires" "template" "throw" - "try" "typename" "using" "virtual" + "try" "typename" "using" "xor" "xor_eq")) (append '("auto") c-keywords)))) @@ -635,7 +635,8 @@ MODE is either `c' or `cpp'." `([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face ,@(when (eq mode 'cpp) '((auto) @font-lock-keyword-face - (this) @font-lock-keyword-face))) + (this) @font-lock-keyword-face + (virtual) @font-lock-keyword-face))) :language mode :feature 'operator