From: Brian Leung <leungbk@posteo.net>
To: 59924@debbugs.gnu.org
Cc: casouri@gmail.com
Subject: bug#59924: [PATCH] Fontify "this" as a keyword instead of a constant in c++-ts-mode
Date: Fri, 09 Dec 2022 11:12:18 +0000 [thread overview]
Message-ID: <87k030rfu5.fsf@posteo.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 546 bytes --]
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'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fontify-this-as-a-keyword-instead-of-a-constant-in-c.patch --]
[-- Type: text/patch, Size: 1255 bytes --]
From d1ae26f299f3f734ef523f000722952c699bcf47 Mon Sep 17 00:00:00 2001
From: Brian Leung <leungbk@posteo.net>
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
next reply other threads:[~2022-12-09 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 11:12 Brian Leung [this message]
2022-12-09 22:16 ` bug#59924: [PATCH] Fontify "this" as a keyword instead of a constant in c++-ts-mode Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k030rfu5.fsf@posteo.net \
--to=leungbk@posteo.net \
--cc=59924@debbugs.gnu.org \
--cc=casouri@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).