summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-engine.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-12-02 17:34:10 +0100
committerStefan Kangas <stefan@marxist.se>2021-12-02 17:34:10 +0100
commitfa2e812894b999eba8afc4b146ca5e70fa9bd1c8 (patch)
tree09f2fb89ba08231529883f111236212078eaa28b /lisp/progmodes/cc-engine.el
parenta97fce7a894f1d5848842a7c37684d01eff48deb (diff)
parentaa1d7dd867c7d4e06f1b0d3172adc095f3f19643 (diff)
downloademacs-fa2e812894b999eba8afc4b146ca5e70fa9bd1c8.tar.gz
emacs-fa2e812894b999eba8afc4b146ca5e70fa9bd1c8.tar.bz2
emacs-fa2e812894b999eba8afc4b146ca5e70fa9bd1c8.zip
Merge from origin/emacs-28
aa1d7dd867 ; * etc/AUTHORS: Update. 6294e60205 ; * admin/authors.el (authors-aliases): More fixes. 40fc31ea28 ; * ChangeLog.3: Update. 2be090d5d3 ; * ChangeLog.3: Minor fixes. 9963b11bf7 ; * admin/authors.el (authors-aliases): Further updates. 50b40e1d4f ; * lisp/org/ob-julia.el: Fix Author header for authors.el. 84166ea2e6 CC Mode: Recognise "struct foo {" as introducing a type de...
Diffstat (limited to 'lisp/progmodes/cc-engine.el')
-rw-r--r--lisp/progmodes/cc-engine.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index c7b01de9b98..d37a50997ad 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -10009,7 +10009,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