Subject: [PATCH] Fontify "this" as a keyword instead of a constant in c++-ts-mode
From: Brian Leung <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Fri, 09 Dec 2022 11:12:18 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Tags: patch

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.16.0, Xaw3d scroll bars)
Repository revision: 8c01829c01ca81c990eadf34bc16794b65d62c70
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: NixOS 23.05 (Stoat)

Configured using:
 'configure
 --prefix=/nix/store/nd0r6yfaxb73mkgs82kqhqkg68f0axqj-emacs-git-20221209.0
 --disable-build-details --with-modules --with-x-toolkit=lucid
 --with-xft --with-cairo --with-native-compilation'

From d1ae26f299f3f734ef523f000722952c699bcf47 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Fri, 9 Dec 2022 03:09:31 -0800
Subject: [PATCH] Fontify "this" as a keyword instead of a constant in
 c++-ts-mode

* 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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 7b41718a745..824325d83e0 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -234,14 +234,14 @@ c-ts-mode--font-lock-settings
      (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
-- 
2.38.1