emacs-diffs
[Top][All Lists]
Advanced

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

emacs-27 8abce5b: CC Mode: Only recognize foo (*bar) as a function point


From: Alan Mackenzie
Subject: emacs-27 8abce5b: CC Mode: Only recognize foo (*bar) as a function pointer when followed by (
Date: Wed, 28 Oct 2020 06:25:25 -0400 (EDT)

branch: emacs-27
commit 8abce5b0c62d41f1f6a074742af1a4749ae7d4ab
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>

    CC Mode: Only recognize foo (*bar) as a function pointer when followed by (
    
    * lisp/progmodes/cc-engine.el (c-forward-over-decl-or-cast-1): (after CASE 
2)
    test variables got-suffix-after-parens and at-decl-end before invoking
    c-fdoc-shift-type-backward.
---
 lisp/progmodes/cc-engine.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 4b14dd1..f751e72 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -9858,8 +9858,9 @@ This function might do hidden buffer changes."
                 (throw 'at-decl-or-cast t))
 
               (when (and got-parens
-                         (not got-function-name-prefix)
-                         ;; (not got-suffix-after-parens)
+                         (or (not got-function-name-prefix)
+                             (and (not got-suffix-after-parens)
+                                  at-decl-end))
                          (or backup-at-type
                              maybe-typeless
                              backup-maybe-typeless



reply via email to

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