From: Alan Mackenzie Date: Wed, 28 Oct 2020 10:22:37 +0000 (+0000) Subject: CC Mode: Only recognize foo (*bar) as a function pointer when followed by ( X-Git-Tag: emacs-27.1.90~94 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8abce5b0c6;p=emacs.git 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. --- diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 4b14dd131c2..f751e72de47 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