[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3ef68c2d7a: CC Mode: Correct a rare error in the state cache
From: |
Alan Mackenzie |
Subject: |
master 3ef68c2d7a: CC Mode: Correct a rare error in the state cache |
Date: |
Tue, 17 May 2022 07:29:24 -0400 (EDT) |
branch: master
commit 3ef68c2d7a3d7c314cebc27b7cbeb3016211b53e
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
CC Mode: Correct a rare error in the state cache
* lisp/progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache): Do
not record a position in a macro as the starting position in
c-state-brace-pair-desert. Instead record the position at the beginning of
that macro.
---
lisp/progmodes/cc-engine.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 2a9a7a8bf5..8794a527f8 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -3886,7 +3886,10 @@ initializing CC Mode. Currently (2020-06) these are
`js-mode' and
(cons (if (and ce (< bra ce) (> ce here)) ; {..} straddling
HERE?
bra
(point-min))
- (min here from)))))))))
+ (progn
+ (goto-char (min here from))
+ (c-beginning-of-macro)
+ (point))))))))))
(defsubst c-state-push-any-brace-pair (bra+1 macro-start-or-here)
;; If BRA+1 is nil, do nothing. Otherwise, BRA+1 is the buffer position
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 3ef68c2d7a: CC Mode: Correct a rare error in the state cache,
Alan Mackenzie <=