diff options
| author | Brian Leung | 2022-12-09 03:09:31 -0800 |
|---|---|---|
| committer | Yuan Fu | 2022-12-09 16:46:01 -0800 |
| commit | 8f53fa10d9453f36aa601e5943cb903adeacc7fe (patch) | |
| tree | f4d1e5958a7d98a42f075d7400088e5638d7dc25 | |
| parent | 8de8f1dc05198ea9a1106ac2282acc9c93ee1ebd (diff) | |
| download | emacs-8f53fa10d9453f36aa601e5943cb903adeacc7fe.tar.gz emacs-8f53fa10d9453f36aa601e5943cb903adeacc7fe.zip | |
Fontify "this" as a keyword in c++-ts-mode (bug#59924)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Following c++-mode, fontify as a keyword instead of a constant.
| -rw-r--r-- | lisp/progmodes/c-ts-mode.el | 6 |
1 files 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 @@ MODE is either `c' or `cpp'." | |||
| 234 | (false) @font-lock-constant-face | 234 | (false) @font-lock-constant-face |
| 235 | (null) @font-lock-constant-face | 235 | (null) @font-lock-constant-face |
| 236 | ,@(when (eq mode 'cpp) | 236 | ,@(when (eq mode 'cpp) |
| 237 | '((this) @font-lock-constant-face | 237 | '((nullptr) @font-lock-constant-face))) |
| 238 | (nullptr) @font-lock-constant-face))) | ||
| 239 | 238 | ||
| 240 | :language mode | 239 | :language mode |
| 241 | :feature 'keyword | 240 | :feature 'keyword |
| 242 | `([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face | 241 | `([,@(c-ts-mode--keywords mode)] @font-lock-keyword-face |
| 243 | ,@(when (eq mode 'cpp) | 242 | ,@(when (eq mode 'cpp) |
| 244 | '((auto) @font-lock-keyword-face))) | 243 | '((auto) @font-lock-keyword-face |
| 244 | (this) @font-lock-keyword-face))) | ||
| 245 | 245 | ||
| 246 | :language mode | 246 | :language mode |
| 247 | :feature 'operator | 247 | :feature 'operator |