]> git.eshelyaron.com Git - emacs.git/commit
C++ Mode: Fontify correctly declarators with identifier preceded by &
authorAlan Mackenzie <acm@muc.de>
Thu, 3 Oct 2019 12:50:08 +0000 (12:50 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 3 Oct 2019 12:50:08 +0000 (12:50 +0000)
commite7e55e5e4dad95c5e605553d4ad3daa1422d0ea3
treef05c879291bb42b59d592302360200392667e22c
parent5b09393f2cde83f10c84926ba579782fb52e05b8
C++ Mode: Fontify correctly declarators with identifier preceded by &

The problem was bar in the following being spuriously recognised as a
function, and foo as a type, as though the & were a *: Foo foo (&bar);.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): New variable
got-function-name-prefix, which is set when an operator like * (but not &)
precedes the putative identifer in parentheses.  Test this variable when
deciding whether or not to "move the type backwards" to the previous
identifier.

* lisp/progmodes/cc-langs.el (c-type-decl-operator-prefix-key): New lang const
and var.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el