]> git.eshelyaron.com Git - emacs.git/commitdiff
Fontify "this" as a keyword in c++-ts-mode (bug#59924)
authorBrian Leung <leungbk@posteo.net>
Fri, 9 Dec 2022 11:09:31 +0000 (03:09 -0800)
committerYuan Fu <casouri@gmail.com>
Sat, 10 Dec 2022 00:46:01 +0000 (16:46 -0800)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Following c++-mode, fontify as a keyword instead of a constant.

lisp/progmodes/c-ts-mode.el

index 7b41718a745efb1432a4e7f3d40628f025dece0c..824325d83e05004e9142a2cf611e207fe5266fb7 100644 (file)
@@ -234,14 +234,14 @@ MODE is either `c' or `cpp'."
      (false) @font-lock-constant-face
      (null) @font-lock-constant-face
      ,@(when (eq mode 'cpp)
-         '((this) @font-lock-constant-face
-           (nullptr) @font-lock-constant-face)))
+         '((nullptr) @font-lock-constant-face)))
 
    :language mode
    :feature 'keyword
    `([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face
      ,@(when (eq mode 'cpp)
-         '((auto) @font-lock-keyword-face)))
+         '((auto) @font-lock-keyword-face
+           (this) @font-lock-keyword-face)))
 
    :language mode
    :feature 'operator