CC Mode: Change the default value of objc-font-lock-extra-types to nil

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.
This commit is contained in:
Alan Mackenzie 2023-01-23 21:28:32 +00:00
parent 7f438ff543
commit c15c0f7f01
2 changed files with 7 additions and 2 deletions

View file

@ -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

View 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