emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 84e7c2fbc8: Fix fontification of C++ reference return types (bu


From: Yuan Fu
Subject: emacs-29 84e7c2fbc8: Fix fontification of C++ reference return types (bug#60441)
Date: Sun, 1 Jan 2023 19:27:42 -0500 (EST)

branch: emacs-29
commit 84e7c2fbc85e5b7fbc5f9c225c2d1ba4cba2689b
Author: Daniel Martín <mardani29@yahoo.es>
Commit: Yuan Fu <casouri@gmail.com>

    Fix fontification of C++ reference return types (bug#60441)
    
    * lisp/progmodes/c-ts-mode.el (c-ts-fontify-error): Treat
    reference_declarator nodes the same as pointer_declarator nodes when
    calculating the identifier to fontify.
---
 lisp/progmodes/c-ts-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 8325b41181..1f2a195bf6 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -425,7 +425,7 @@ MODE is either `c' or `cpp'."
     ;; Recurse.
     ((or "attributed_declarator" "parenthesized_declarator")
      (c-ts-mode--declarator-identifier (treesit-node-child node 0 t)))
-    ("pointer_declarator"
+    ((or "pointer_declarator" "reference_declarator")
      (c-ts-mode--declarator-identifier (treesit-node-child node -1)))
     ((or "function_declarator" "array_declarator" "init_declarator")
      (c-ts-mode--declarator-identifier



reply via email to

[Prev in Thread] Current Thread [Next in Thread]