]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode: Only recognize foo (*bar) as a function pointer when followed by (
authorAlan Mackenzie <acm@muc.de>
Wed, 28 Oct 2020 10:22:37 +0000 (10:22 +0000)
committerAlan Mackenzie <acm@muc.de>
Wed, 28 Oct 2020 10:22:37 +0000 (10:22 +0000)
* 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

index 4b14dd131c24c5499b13a94b2d1e3b066867771e..f751e72de47d48b74d8b8e883aecaf5d90456067 100644 (file)
@@ -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