From 066aad7b9d137cb5262e57295eb32c57faa4f9cc Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Mon, 27 Jan 2020 18:10:34 +0000 Subject: Finish the documentation for c-noise-macro-{,with-parens-}names. The doc strings and pertinent CC Mode manual page failed to mention that these variables could also be regular expressions. Amend them. * lisp/progmodes/cc-vars.el (c-noise-macro-names) (c-noise-macro-with-parens-names): Amend the doc strings. * doc/misc/cc-mode.texi (Noise Macros): Amend the descriptions of the two variables. --- doc/misc/cc-mode.texi | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'doc/misc/cc-mode.texi') diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 2c49a90c54b..544ff853351 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -7095,22 +7095,24 @@ constitute noise macros. @vindex noise-macro-names @r{(c-)} This variable is a list of names of noise macros which never have parenthesized arguments. Each element is a string, and must be a -valid identifier. An element in @code{c-noise-macro-names} must not -also be in @code{c-noise-macro-with-parens-names}. Such an element is -treated as whitespace by @ccmode{}. +valid identifier. Alternatively, the variable may be a regular +expression which matches the names of such macros. Such a noise macro +is treated as whitespace by @ccmode{}. It must not also be in, or be +matched by @code{c-noise-macro-with-parens-names}. @end defopt @defopt c-noise-macro-with-parens-names @vindex noise-macro-with-parens-names @r{(c-)} This variable is a list of names of noise macros which optionally have arguments in parentheses. Each element of the list is a string, and -must be a valid identifier. An element in -@code{c-noise-macro-with-parens-names} must not also be in -@code{c-noise-macro-names}. For performance reasons, such an element, -together with the optional parenthesized arguments, is specially -handled, but it is only handled when used in declaration -contexts@footnote{If this restriction causes your project -difficulties, please get in touch with @email{bug-cc-mode@@gnu.org}.}. +must be a valid identifier. Alternatively, the variable may be a +regular expression which matches the names of such macros. Such a +noise macro must not also be in, or be matched by +@code{c-noise-macro-names}. For performance reasons, such a noise +macro, including any parenthesized arguments, is specially handled, +but it is only handled when used in declaration contexts@footnote{If +this restriction causes your project difficulties, please get in touch +with @email{bug-cc-mode@@gnu.org}.}. The two compiler directives @code{__attribute__} and @code{__declspec} have traditionally been handled specially in @ccmode{}; for example -- cgit v1.2.3