CC Mode: Fix erroneous type: arguments to two defcustoms.

This allows customize to set the variables directly to regular
expressions as an alternative to a list of identifiers.  It
fixes bug#81339.
* lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-names)
(c-noise-macro-names): Correct the type: arguments to defcustom
to two `choice' constructs.
This commit is contained in:
Alan Mackenzie 2026-07-02 10:26:39 +00:00 committed by Eli Zaretskii
parent ba7c04d26c
commit 7746db313a

View file

@ -1737,7 +1737,9 @@ If you change this variable's value, call the function
`c-make-noise-macro-regexps' to set the necessary internal variables (or do
this implicitly by reinitializing C/C++/Objc Mode on any buffer)."
:version "26.1"
:type '(repeat :tag "List of names" string)
:type '(choice
(repeat :tag "List of names (possibly empty)" string)
(regexp :tag "Names regexp"))
:group 'c)
(put 'c-noise-macro-names 'safe-local-variable #'c-string-list-p)
(make-variable-buffer-local 'c-noise-macro-names)
@ -1754,7 +1756,9 @@ If you change this variable's value, call the function
`c-make-noise-macro-regexps' to set the necessary internal variables (or do
this implicitly by reinitializing C/C++/Objc Mode on any buffer)."
:version "26.1"
:type '(repeat :tag "List of names (possibly empty)" string)
:type '(choice
(repeat :tag "List of names (possibly empty)" string)
(regexp :tag "Names regexp"))
:group 'c)
(put 'c-noise-macro-with-parens-names 'safe-local-variable #'c-string-list-p)
(make-variable-buffer-local 'c-noise-macro-with-parens-names)