]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode: Change the default value of objc-font-lock-extra-types to nil
authorAlan Mackenzie <acm@muc.de>
Mon, 23 Jan 2023 21:28:32 +0000 (21:28 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 23 Jan 2023 21:28:32 +0000 (21:28 +0000)
This fixes bug #59234, in which random identifiers in a .m file were getting
fontified as types.

* lisp/progmodes/cc-vars.el (objc-font-lock-extra-types): Change the default
value to nil.

* etc/NEWS: Mention the change in default value of objc-font-lock-extra-types,
and how to get the old behavior back.

etc/NEWS
lisp/progmodes/cc-vars.el

index 64c26f93c50111069c8d55635d27a803db3e1205..dd026016382a1d408a192034fe24370c26efe3cc 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1679,6 +1679,12 @@ command is installed.
 
 ---
 *** C++ Mode now supports most of the new features in the C++20 Standard.
+---
+*** In objective-C Mode, the default value of
+objc-font-lock-extra-types has been changed to nil, since too many
+identifiers were getting misfontified as types.  This may cause some
+actual types not to get fontified.  To get the old behavior back,
+customize the variable to the value suggested in its doc string.
 
 ** Cperl Mode
 
index 2206e0fcab67f021da7face665c17ea109af9fe1..60ed3521b8af02ef1fc96ce7de45fe4644573b0f 100644 (file)
@@ -1609,8 +1609,7 @@ as a type name.")
   :type 'c-extra-types-widget
   :group 'c)
 
-(defcustom objc-font-lock-extra-types
-  (list (concat "[" c-upper "]\\sw*[" c-lower "]\\sw*"))
+(defcustom objc-font-lock-extra-types nil
   (c-make-font-lock-extra-types-blurb "ObjC" "objc-mode" (concat
 "For example, a value of (\"[" c-upper "]\\\\sw*[" c-lower "]\\\\sw*\") means
 capitalized words are treated as type names (the requirement for a