]> git.eshelyaron.com Git - emacs.git/commitdiff
Fontify destructor in c++-ts-mode
authorVincenzo Pupillo <vincenzo.pupillo@unimi.it>
Mon, 1 Jul 2024 09:52:18 +0000 (11:52 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 13 Jul 2024 20:07:17 +0000 (22:07 +0200)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
Add a rule for destructors.  (Bug#71872)

(cherry picked from commit 53291e3d46ee81b2b0fb7594496d938eab61bc0f)

lisp/progmodes/c-ts-mode.el

index db34339a0fd9e173140cd1bcec91b4ed20c374f6..6325fc20e6e46651f5687d19aebe26378eb4a512 100644 (file)
@@ -674,7 +674,9 @@ MODE is either `c' or `cpp'."
    :language mode
    :feature 'definition
    ;; Highlights identifiers in declarations.
-   `((declaration
+   `(,@(when (eq mode 'cpp)
+         '((destructor_name (identifier) @font-lock-function-name-face)))
+     (declaration
       declarator: (_) @c-ts-mode--fontify-declarator)
 
      (field_declaration