aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2023-01-23 21:28:32 +0000
committerAlan Mackenzie2023-01-23 21:28:32 +0000
commitc15c0f7f018f5beea02175603f45ff5edf6d3837 (patch)
treec54f8d4e9a3ac6d3eb775c6e0db5204aaade1c95
parent7f438ff543b7bd83cee6c75be1d16abc1215d37f (diff)
downloademacs-c15c0f7f018f5beea02175603f45ff5edf6d3837.tar.gz
emacs-c15c0f7f018f5beea02175603f45ff5edf6d3837.zip
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.
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/progmodes/cc-vars.el3
2 files changed, 7 insertions, 2 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 64c26f93c50..dd026016382 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1679,6 +1679,12 @@ command is installed.
1679 1679
1680--- 1680---
1681*** C++ Mode now supports most of the new features in the C++20 Standard. 1681*** C++ Mode now supports most of the new features in the C++20 Standard.
1682---
1683*** In objective-C Mode, the default value of
1684objc-font-lock-extra-types has been changed to nil, since too many
1685identifiers were getting misfontified as types. This may cause some
1686actual types not to get fontified. To get the old behavior back,
1687customize the variable to the value suggested in its doc string.
1682 1688
1683** Cperl Mode 1689** Cperl Mode
1684 1690
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 2206e0fcab6..60ed3521b8a 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1609,8 +1609,7 @@ as a type name.")
1609 :type 'c-extra-types-widget 1609 :type 'c-extra-types-widget
1610 :group 'c) 1610 :group 'c)
1611 1611
1612(defcustom objc-font-lock-extra-types 1612(defcustom objc-font-lock-extra-types nil
1613 (list (concat "[" c-upper "]\\sw*[" c-lower "]\\sw*"))
1614 (c-make-font-lock-extra-types-blurb "ObjC" "objc-mode" (concat 1613 (c-make-font-lock-extra-types-blurb "ObjC" "objc-mode" (concat
1615"For example, a value of (\"[" c-upper "]\\\\sw*[" c-lower "]\\\\sw*\") means 1614"For example, a value of (\"[" c-upper "]\\\\sw*[" c-lower "]\\\\sw*\") means
1616capitalized words are treated as type names (the requirement for a 1615capitalized words are treated as type names (the requirement for a