From 8abce5b0c62d41f1f6a074742af1a4749ae7d4ab Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 28 Oct 2020 10:22:37 +0000 Subject: [PATCH] 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 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 -- 2.39.2