]> git.eshelyaron.com Git - emacs.git/commitdiff
C Mode: Don't fontify foo globally as type due to "struct foo"
authorAlan Mackenzie <acm@muc.de>
Sat, 1 Jul 2023 11:17:31 +0000 (11:17 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 1 Jul 2023 11:17:31 +0000 (11:17 +0000)
This fixes bug#64322.

* lisp/progmodes/cc-langs.el (c-typeless-decl-kwds): Make the
entry for c-mode nil.

lisp/progmodes/cc-fonts.el
lisp/progmodes/cc-langs.el

index e6c6c65f59c91569e1837665ba15b6fb919a3e25..f7779100b04ede5685fce15575ad1fba93e39c4b 100644 (file)
@@ -2240,7 +2240,7 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
                     (c-forward-syntactic-ws))
                   (goto-char (match-end ,type-match))))))))
 
-      ;; Fontify special declarations that lacks a type.
+      ;; Fontify special declarations that lack a type.
       ,@(when (c-lang-const c-typeless-decl-kwds)
          `((,(c-make-font-lock-search-function
               (concat "\\<\\("
index 1749a2dfa7a3a68d014b2ae2fe83fab088a4ea4c..a24765618569810031f604200e37987b2fdee9eb 100644 (file)
@@ -2588,6 +2588,7 @@ will be handled."
   ;; {...}").
   t    (append (c-lang-const c-class-decl-kwds)
               (c-lang-const c-brace-list-decl-kwds))
+  c nil
   ;; Note: "manages" for CORBA CIDL clashes with its presence on
   ;; `c-type-list-kwds' for IDL.
   idl  (append (c-lang-const c-typeless-decl-kwds)