emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 36edb6c: CC Mode: stop distinguishing brace block


From: Alan Mackenzie
Subject: [Emacs-diffs] emacs-26 36edb6c: CC Mode: stop distinguishing brace blocks from defun blocks by content.
Date: Thu, 18 Jan 2018 13:02:59 -0500 (EST)

branch: emacs-26
commit 36edb6cb97ce3d53543c87643077d270bb5bdfd1
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    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.
---
 lisp/progmodes/cc-engine.el | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index e997260..ed8dc6d 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."
                            (save-excursion
                              (goto-char containing-sexp)
                              (c-looking-at-special-brace-list)))
-                      (c-inside-bracelist-p containing-sexp paren-state t)
-                      (save-excursion
-                        (goto-char containing-sexp)
-                        (and (eq (char-after) ?{)
-                             (not (c-looking-at-statement-block)))))))
+                      (c-inside-bracelist-p containing-sexp paren-state t))))
        (cond
 
         ;; CASE 9A: In the middle of a special brace list opener.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]