]> git.eshelyaron.com Git - emacs.git/commit
CC Mode: Prevent two classes of "type" prematurely entering c-found-types
authorAlan Mackenzie <acm@muc.de>
Thu, 19 Jan 2023 10:59:10 +0000 (10:59 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 19 Jan 2023 10:59:10 +0000 (10:59 +0000)
commit21be03cccb611ea9e6c73fb04e578c48edf49a25
treecb0d704ac69299935ed11ca1b95c37dd30038101
parentdb727873803a974ba210c4942ae7cbcc3d6268ab
CC Mode: Prevent two classes of "type" prematurely entering c-found-types

This fixes bug #60769.  The two classes of "type" are foo and bar in
"foo d(bar () ...)", where the d could be a mistyped C-M-d.

* list/progmodes/cc-engine.el (c-forward-decl-or-cast-1): New local variable
got-arglist.  Refactor a sequence of enclosed `if' forms into a `cond' form.
Set got-arglist when needed.  In CASE 2, set unsafe-maybe to inhibit foo
being entered into c-found-types.  In CASE 19, likewise set unsafe-maybe, to
inhibit bar entering c-found-types.
lisp/progmodes/cc-engine.el