This instance will be upgraded to Heptapod 0.25.0 (final) on 2021-09-22 at 15:00 UTC+2 (a few minutes of down time)

Commit 807bf292 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

CC Mode: Fix calculation of c-parse-state when there're macros with braces

This fixes bug #46951.

* cc-engine.el (c-append-lower-brace-pair-to-state-cache): Ensure the starting
point for backward scanning is not within a macro which doesn't contain HERE.
parent 4c76c8e608e5
......@@ -3800,12 +3800,14 @@ mhtml-mode."
(bra ; Position of "{".
;; Don't start scanning in the middle of a CPP construct unless
;; it contains HERE - these constructs, in Emacs, are "commented
;; out" with category properties.
(if (eq (c-get-char-property macro-start-or-from 'category)
;; it contains HERE.
(if (and (not (eq macro-start-or-from from))
(< macro-start-or-from here) ; Might not be needed.
(progn (goto-char macro-start-or-from)
(>= (point) here)))
ce) ; Position of "}"
(or upper-lim (setq upper-lim from))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment