summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-vars.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2020-09-12 16:37:56 +0000
committerAlan Mackenzie <acm@muc.de>2020-09-12 16:37:56 +0000
commit62f239eec2be42d857cc91009b4b7d8c8cf31b4e (patch)
tree0a9c9fdafc5672803fa696e4ae9286857a6fb4aa /lisp/progmodes/cc-vars.el
parentd228cac2e8d7026231daf1c97fb37279d61420a9 (diff)
downloademacs-62f239eec2be42d857cc91009b4b7d8c8cf31b4e.tar.gz
C++ Mode: handle __attribute__,etc. inside constructor argument lists
This corrects both the fontification and indentation of these things, fixing bug #42270. * lisp/progmodes/cc-engine.el (c-do-declarators): Skip over "hangon keys" and noise macros whilst scanning a putative C++ function. (c-forward-decl-or-cast-1): When checking for typeless functions, skip over "hangon keys" and noise macros. * lisp/progmodes/cc-mode.el (c-fl-decl-end): Deal with certain invalid "nested declarators" by scanning over them with a recursive call of c-fl-decl-end. * lisp/progmodes/cc-vars.el (c-noise-macro-names) (c-noise-macro-with-parens-names): State in the doc strings that if either of these is a regexp, it must have a submatch 1 which matches the noise macro exactly.
Diffstat (limited to 'lisp/progmodes/cc-vars.el')
-rw-r--r--lisp/progmodes/cc-vars.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index b885f6ae1d8..9e6f9527ca1 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1670,7 +1670,8 @@ indented as a statement."
like \"INLINE\" which are syntactic noise. Such a macro/extension is complete
in itself, never having parentheses. All these names must be syntactically
valid identifiers. Alternatively, this variable may be a regular expression
-which matches the names of such macros.
+which matches the names of such macros, in which case it must have a submatch
+1 which matches the actual noise macro name.
If you change this variable's value, call the function
`c-make-noise-macro-regexps' to set the necessary internal variables (or do
@@ -1686,7 +1687,8 @@ this implicitly by reinitializing C/C++/Objc Mode on any buffer)."
which optionally have arguments in parentheses, and which expand to nothing.
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.
+regular expression which matches the names of such macros, in which case it
+must have a submatch 1 which matches the actual noise macro name.
If you change this variable's value, call the function
`c-make-noise-macro-regexps' to set the necessary internal variables (or do