diff options
| author | Alan Mackenzie | 2022-11-29 20:19:34 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2022-11-29 20:22:58 +0000 |
| commit | f373a23e5171fd8ecb4555cee618bbcd2e7077e3 (patch) | |
| tree | 9701e66d8830d4c160d5a1b58aaebeb7d8373a2a | |
| parent | 00cb6e052a6adce087e24871068737e10c8adc10 (diff) | |
| download | emacs-f373a23e5171fd8ecb4555cee618bbcd2e7077e3.tar.gz emacs-f373a23e5171fd8ecb4555cee618bbcd2e7077e3.zip | |
CC Mode: Prevent lone ids being parsed as types unless in decl arglists
This fixes bug #59051.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): In the test for the
last invocation of c-fdoc-shift-type-backward before CASE 1, additionally
test CONTEXT not being an arglist or BACKUP-AT-TYPE being non-nil.
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 11ddb39ed91..edb873f5a62 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -10678,6 +10678,8 @@ This function might do hidden buffer changes." | |||
| 10678 | (c-forward-syntactic-ws)) | 10678 | (c-forward-syntactic-ws)) |
| 10679 | 10679 | ||
| 10680 | (when (and (not got-identifier) | 10680 | (when (and (not got-identifier) |
| 10681 | (or backup-at-type | ||
| 10682 | (not (memq context '(arglist decl)))) | ||
| 10681 | (or (and new-style-auto | 10683 | (or (and new-style-auto |
| 10682 | (looking-at c-auto-ops-re)) | 10684 | (looking-at c-auto-ops-re)) |
| 10683 | (and (or maybe-typeless backup-maybe-typeless) | 10685 | (and (or maybe-typeless backup-maybe-typeless) |