From: Alan Mackenzie Date: Sat, 1 Jul 2023 11:17:31 +0000 (+0000) Subject: C Mode: Don't fontify foo globally as type due to "struct foo" X-Git-Tag: emacs-29.1-rc1~78 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7a74b8c32773633983089623203aea21b7f43afa;p=emacs.git C Mode: Don't fontify foo globally as type due to "struct foo" This fixes bug#64322. * lisp/progmodes/cc-langs.el (c-typeless-decl-kwds): Make the entry for c-mode nil. --- diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index e6c6c65f59c..f7779100b04 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -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 "\\<\\(" diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 1749a2dfa7a..a2476561856 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -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)