aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2018-01-18 17:54:02 +0000
committerAlan Mackenzie2018-01-18 17:54:02 +0000
commit36edb6cb97ce3d53543c87643077d270bb5bdfd1 (patch)
tree541f23713a316f4058d984ac70e537825c171319
parent779b2ac48423ae72a8cb5cd789a2a25302d857d9 (diff)
downloademacs-36edb6cb97ce3d53543c87643077d270bb5bdfd1.tar.gz
emacs-36edb6cb97ce3d53543c87643077d270bb5bdfd1.zip
CC Mode: stop distinguishing brace blocks from defun blocks by content.
Don't merge to master; this is a quick fix for the emacs-26 branch. This is essentially a reversion of the patch from 2017-11-10 which attempted to handle C99's compound literals. The bug here was triggered when a defun block contained a declaration ending in a comma, yet without a semicolon. * lisp/progmodes/cc-engine.el (c-guess-basic-syntax): At the CASE 9 test, remove from the `or' form the test of a block's contents.
-rw-r--r--lisp/progmodes/cc-engine.el6
1 files changed, 1 insertions, 5 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index e9972602812..ed8dc6de239 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -12554,11 +12554,7 @@ comment at the start of cc-engine.el for more info."
12554 (save-excursion 12554 (save-excursion
12555 (goto-char containing-sexp) 12555 (goto-char containing-sexp)
12556 (c-looking-at-special-brace-list))) 12556 (c-looking-at-special-brace-list)))
12557 (c-inside-bracelist-p containing-sexp paren-state t) 12557 (c-inside-bracelist-p containing-sexp paren-state t))))
12558 (save-excursion
12559 (goto-char containing-sexp)
12560 (and (eq (char-after) ?{)
12561 (not (c-looking-at-statement-block)))))))
12562 (cond 12558 (cond
12563 12559
12564 ;; CASE 9A: In the middle of a special brace list opener. 12560 ;; CASE 9A: In the middle of a special brace list opener.