diff options
author | Alan Mackenzie <acm@muc.de> | 2016-06-29 20:17:39 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2016-06-29 20:17:39 +0000 |
commit | 681d3f1f582d9b549f41ef1eacff42abb98f878d (patch) | |
tree | e67927c1fd6a97f2d7e245fe6097049c916c2fa4 /doc | |
parent | 4a2a1eba09e5bbc37b853733708feae17f1425f5 (diff) |
Fix C-M-a in a C function finding the start of a macro preceding it.
Also amend some pertinent documentation. This fixes bug #23818.
* lisp/progmodes/cc-engine.el (c-beginning-of-decl-1): Also check for a
virtual semicolon at a place where we check for other types of statement ends.
* lisp/progmodes/cc-vars.el (c-macro-nacmes-with-semicolon): Remove from the
doc string the bit saying that the variable is a prototype and liable to
change.
* doc/misc/cc-mode.texi (Macros with ;): Enhance, stating that configuring
macros with semicolon can prevent C-M-a missing the beginning of defun.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/misc/cc-mode.texi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 82f8cbc2e3..f311ec8a3a 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -6727,9 +6727,11 @@ Macros which needn't (or mustn't) be followed by a semicolon when you invoke them, @dfn{macros with semicolons}, are very common. These can cause @ccmode{} to parse the next line wrongly as a @code{statement-cont} (@pxref{Function Symbols}) and thus mis-indent -it. +it. At the top level, a macro invocation before a defun start can +cause, for example, @code{c-beginning-of-defun} (@kbd{C-M-a}) not to +find the correct start of the current function. -You can prevent this by specifying which macros have semicolons. It +You can prevent these by specifying which macros have semicolons. It doesn't matter whether or not such a macro has a parameter list: @defopt c-macro-names-with-semicolon |