]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix fontification of C++ reference return types (bug#60441)
authorDaniel Martín <mardani29@yahoo.es>
Sat, 31 Dec 2022 00:45:27 +0000 (01:45 +0100)
committerYuan Fu <casouri@gmail.com>
Mon, 2 Jan 2023 00:25:07 +0000 (16:25 -0800)
* 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

index 8325b41181690e7052ae1a6d00ad3e6cb66e3c0f..1f2a195bf64a5d1069c57e8ddad1dc2960093d37 100644 (file)
@@ -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