diff options
| author | Alan Mackenzie | 2020-01-27 18:10:34 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2020-01-27 18:10:34 +0000 |
| commit | 066aad7b9d137cb5262e57295eb32c57faa4f9cc (patch) | |
| tree | 0eb7825c5747499a00332fe79c138002e98a86af | |
| parent | c8fcabf24546e77dc5bd0cb1e206e8114809c810 (diff) | |
| download | emacs-066aad7b9d137cb5262e57295eb32c57faa4f9cc.tar.gz emacs-066aad7b9d137cb5262e57295eb32c57faa4f9cc.zip | |
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.
| -rw-r--r-- | doc/misc/cc-mode.texi | 22 | ||||
| -rw-r--r-- | lisp/progmodes/cc-vars.el | 15 |
2 files changed, 23 insertions, 14 deletions
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. | |||
| 7095 | @vindex noise-macro-names @r{(c-)} | 7095 | @vindex noise-macro-names @r{(c-)} |
| 7096 | This variable is a list of names of noise macros which never have | 7096 | This variable is a list of names of noise macros which never have |
| 7097 | parenthesized arguments. Each element is a string, and must be a | 7097 | parenthesized arguments. Each element is a string, and must be a |
| 7098 | valid identifier. An element in @code{c-noise-macro-names} must not | 7098 | valid identifier. Alternatively, the variable may be a regular |
| 7099 | also be in @code{c-noise-macro-with-parens-names}. Such an element is | 7099 | expression which matches the names of such macros. Such a noise macro |
| 7100 | treated as whitespace by @ccmode{}. | 7100 | is treated as whitespace by @ccmode{}. It must not also be in, or be |
| 7101 | matched by @code{c-noise-macro-with-parens-names}. | ||
| 7101 | @end defopt | 7102 | @end defopt |
| 7102 | 7103 | ||
| 7103 | @defopt c-noise-macro-with-parens-names | 7104 | @defopt c-noise-macro-with-parens-names |
| 7104 | @vindex noise-macro-with-parens-names @r{(c-)} | 7105 | @vindex noise-macro-with-parens-names @r{(c-)} |
| 7105 | This variable is a list of names of noise macros which optionally have | 7106 | This variable is a list of names of noise macros which optionally have |
| 7106 | arguments in parentheses. Each element of the list is a string, and | 7107 | arguments in parentheses. Each element of the list is a string, and |
| 7107 | must be a valid identifier. An element in | 7108 | must be a valid identifier. Alternatively, the variable may be a |
| 7108 | @code{c-noise-macro-with-parens-names} must not also be in | 7109 | regular expression which matches the names of such macros. Such a |
| 7109 | @code{c-noise-macro-names}. For performance reasons, such an element, | 7110 | noise macro must not also be in, or be matched by |
| 7110 | together with the optional parenthesized arguments, is specially | 7111 | @code{c-noise-macro-names}. For performance reasons, such a noise |
| 7111 | handled, but it is only handled when used in declaration | 7112 | macro, including any parenthesized arguments, is specially handled, |
| 7112 | contexts@footnote{If this restriction causes your project | 7113 | but it is only handled when used in declaration contexts@footnote{If |
| 7113 | difficulties, please get in touch with @email{bug-cc-mode@@gnu.org}.}. | 7114 | this restriction causes your project difficulties, please get in touch |
| 7115 | with @email{bug-cc-mode@@gnu.org}.}. | ||
| 7114 | 7116 | ||
| 7115 | The two compiler directives @code{__attribute__} and @code{__declspec} | 7117 | The two compiler directives @code{__attribute__} and @code{__declspec} |
| 7116 | have traditionally been handled specially in @ccmode{}; for example | 7118 | have traditionally been handled specially in @ccmode{}; for example |
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 861872486c7..556ff6059f1 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el | |||
| @@ -1657,9 +1657,10 @@ white space either before or after the operator, but not both." | |||
| 1657 | 1657 | ||
| 1658 | (defcustom c-noise-macro-names nil | 1658 | (defcustom c-noise-macro-names nil |
| 1659 | "A list of names of macros which expand to nothing, or compiler extensions | 1659 | "A list of names of macros which expand to nothing, or compiler extensions |
| 1660 | like \"????\" which are syntactic noise. Such a macro/extension is complete in | 1660 | like \"INLINE\" which are syntactic noise. Such a macro/extension is complete |
| 1661 | itself, never having parentheses. All these names must be syntactically valid | 1661 | in itself, never having parentheses. All these names must be syntactically |
| 1662 | identifiers. | 1662 | valid identifiers. Alternatively, this variable may be a regular expression |
| 1663 | which matches the names of such macros. | ||
| 1663 | 1664 | ||
| 1664 | If you change this variable's value, call the function | 1665 | If you change this variable's value, call the function |
| 1665 | `c-make-noise-macro-regexps' to set the necessary internal variables (or do | 1666 | `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)." | |||
| 1673 | (defcustom c-noise-macro-with-parens-names nil | 1674 | (defcustom c-noise-macro-with-parens-names nil |
| 1674 | "A list of names of macros (or compiler extensions like \"__attribute__\") | 1675 | "A list of names of macros (or compiler extensions like \"__attribute__\") |
| 1675 | which optionally have arguments in parentheses, and which expand to nothing. | 1676 | which optionally have arguments in parentheses, and which expand to nothing. |
| 1676 | These are recognized by CC Mode only in declarations." | 1677 | All these names must be syntactically valid identifiers. These are recognized |
| 1678 | by CC Mode only in declarations. Alternatively, this variable may be a | ||
| 1679 | regular expression which matches the names of such macros. | ||
| 1680 | |||
| 1681 | If you change this variable's value, call the function | ||
| 1682 | `c-make-noise-macro-regexps' to set the necessary internal variables (or do | ||
| 1683 | this implicitly by reinitializing C/C++/Objc Mode on any buffer)." | ||
| 1677 | :version "26.1" | 1684 | :version "26.1" |
| 1678 | :type '(repeat :tag "List of names (possibly empty)" string) | 1685 | :type '(repeat :tag "List of names (possibly empty)" string) |
| 1679 | :group 'c) | 1686 | :group 'c) |