all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59924: [PATCH] Fontify "this" as a keyword instead of a constant in c++-ts-mode
@ 2022-12-09 11:12 Brian Leung
  2022-12-09 22:16 ` Yuan Fu
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Leung @ 2022-12-09 11:12 UTC (permalink / raw)
  To: 59924; +Cc: casouri

[-- 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#59924: [PATCH] Fontify "this" as a keyword instead of a constant in c++-ts-mode
  2022-12-09 11:12 bug#59924: [PATCH] Fontify "this" as a keyword instead of a constant in c++-ts-mode Brian Leung
@ 2022-12-09 22:16 ` Yuan Fu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuan Fu @ 2022-12-09 22:16 UTC (permalink / raw)
  To: leungbk; +Cc: 59924-done



Yean it makes sense. Applied, thanks!

Yuan





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-09 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-09 11:12 bug#59924: [PATCH] Fontify "this" as a keyword instead of a constant in c++-ts-mode Brian Leung
2022-12-09 22:16 ` Yuan Fu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.