emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 f373a23e51: CC Mode: Prevent lone ids being parsed as types unl


From: Alan Mackenzie
Subject: emacs-29 f373a23e51: CC Mode: Prevent lone ids being parsed as types unless in decl arglists
Date: Tue, 29 Nov 2022 15:23:28 -0500 (EST)

branch: emacs-29
commit f373a23e5171fd8ecb4555cee618bbcd2e7077e3
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>

    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.
---
 lisp/progmodes/cc-engine.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 11ddb39ed9..edb873f5a6 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -10678,6 +10678,8 @@ This function might do hidden buffer changes."
        (c-forward-syntactic-ws))
 
       (when (and (not got-identifier)
+                (or backup-at-type
+                    (not (memq context '(arglist decl))))
                 (or (and new-style-auto
                          (looking-at c-auto-ops-re))
                     (and (or maybe-typeless backup-maybe-typeless)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]