CC Mode: Recognise "struct foo {" as introducing a type declaration
This fixes bug #52157. * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): If such a construct is parsed, set the flag at-type-decl which is part of the function's return value.
This commit is contained in:
parent
bc6bcb8f0b
commit
84166ea2e6
1 changed files with 6 additions and 1 deletions
|
@ -9978,7 +9978,12 @@ This function might do hidden buffer changes."
|
|||
(save-excursion
|
||||
(goto-char type-start)
|
||||
(let ((c-promote-possible-types t))
|
||||
(c-forward-type)))))
|
||||
(c-forward-type))))
|
||||
|
||||
;; Signal a type declaration for "struct foo {".
|
||||
(when (and backup-at-type-decl
|
||||
(eq (char-after) ?{))
|
||||
(setq at-type-decl t)))
|
||||
|
||||
(setq backup-at-type at-type
|
||||
backup-type-start type-start
|
||||
|
|
Loading…
Add table
Reference in a new issue