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.
This commit is contained in:
parent
c8fcabf245
commit
066aad7b9d
2 changed files with 23 additions and 14 deletions
|
@ -7095,22 +7095,24 @@ constitute noise macros.
|
||||||
@vindex noise-macro-names @r{(c-)}
|
@vindex noise-macro-names @r{(c-)}
|
||||||
This variable is a list of names of noise macros which never have
|
This variable is a list of names of noise macros which never have
|
||||||
parenthesized arguments. Each element is a string, and must be a
|
parenthesized arguments. Each element is a string, and must be a
|
||||||
valid identifier. An element in @code{c-noise-macro-names} must not
|
valid identifier. Alternatively, the variable may be a regular
|
||||||
also be in @code{c-noise-macro-with-parens-names}. Such an element is
|
expression which matches the names of such macros. Such a noise macro
|
||||||
treated as whitespace by @ccmode{}.
|
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
|
@end defopt
|
||||||
|
|
||||||
@defopt c-noise-macro-with-parens-names
|
@defopt c-noise-macro-with-parens-names
|
||||||
@vindex noise-macro-with-parens-names @r{(c-)}
|
@vindex noise-macro-with-parens-names @r{(c-)}
|
||||||
This variable is a list of names of noise macros which optionally have
|
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
|
arguments in parentheses. Each element of the list is a string, and
|
||||||
must be a valid identifier. An element in
|
must be a valid identifier. Alternatively, the variable may be a
|
||||||
@code{c-noise-macro-with-parens-names} must not also be in
|
regular expression which matches the names of such macros. Such a
|
||||||
@code{c-noise-macro-names}. For performance reasons, such an element,
|
noise macro must not also be in, or be matched by
|
||||||
together with the optional parenthesized arguments, is specially
|
@code{c-noise-macro-names}. For performance reasons, such a noise
|
||||||
handled, but it is only handled when used in declaration
|
macro, including any parenthesized arguments, is specially handled,
|
||||||
contexts@footnote{If this restriction causes your project
|
but it is only handled when used in declaration contexts@footnote{If
|
||||||
difficulties, please get in touch with @email{bug-cc-mode@@gnu.org}.}.
|
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}
|
The two compiler directives @code{__attribute__} and @code{__declspec}
|
||||||
have traditionally been handled specially in @ccmode{}; for example
|
have traditionally been handled specially in @ccmode{}; for example
|
||||||
|
|
|
@ -1657,9 +1657,10 @@ white space either before or after the operator, but not both."
|
||||||
|
|
||||||
(defcustom c-noise-macro-names nil
|
(defcustom c-noise-macro-names nil
|
||||||
"A list of names of macros which expand to nothing, or compiler extensions
|
"A list of names of macros which expand to nothing, or compiler extensions
|
||||||
like \"????\" which are syntactic noise. Such a macro/extension is complete in
|
like \"INLINE\" which are syntactic noise. Such a macro/extension is complete
|
||||||
itself, never having parentheses. All these names must be syntactically valid
|
in itself, never having parentheses. All these names must be syntactically
|
||||||
identifiers.
|
valid identifiers. Alternatively, this variable may be a regular expression
|
||||||
|
which matches the names of such macros.
|
||||||
|
|
||||||
If you change this variable's value, call the function
|
If you change this variable's value, call the function
|
||||||
`c-make-noise-macro-regexps' to set the necessary internal variables (or do
|
`c-make-noise-macro-regexps' to set the necessary internal variables (or do
|
||||||
|
@ -1673,7 +1674,13 @@ this implicitly by reinitializing C/C++/Objc Mode on any buffer)."
|
||||||
(defcustom c-noise-macro-with-parens-names nil
|
(defcustom c-noise-macro-with-parens-names nil
|
||||||
"A list of names of macros (or compiler extensions like \"__attribute__\")
|
"A list of names of macros (or compiler extensions like \"__attribute__\")
|
||||||
which optionally have arguments in parentheses, and which expand to nothing.
|
which optionally have arguments in parentheses, and which expand to nothing.
|
||||||
These are recognized by CC Mode only in declarations."
|
All these names must be syntactically valid identifiers. These are recognized
|
||||||
|
by CC Mode only in declarations. Alternatively, this variable may be a
|
||||||
|
regular expression which matches the names of such macros.
|
||||||
|
|
||||||
|
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"
|
:version "26.1"
|
||||||
:type '(repeat :tag "List of names (possibly empty)" string)
|
:type '(repeat :tag "List of names (possibly empty)" string)
|
||||||
:group 'c)
|
:group 'c)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue