[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master d13dc27: Handling of `c-parse-state'. Fix low level
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master d13dc27: Handling of `c-parse-state'. Fix low level bug. |
Date: |
Thu, 20 Aug 2015 10:38:12 +0000 |
branch: master
commit d13dc271e52c7d977aee6f32c3d40b8b15b04c6c
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
Handling of `c-parse-state'. Fix low level bug.
progmodes/cc-engine.el (c-remove-stale-state-cache-backwards): Add
"CASE 3.5" to handle `cache-pos' being only slightly before `here'.
---
lisp/progmodes/cc-engine.el | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index f5285a6..520b7e5 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -3135,16 +3135,20 @@ comment at the start of cc-engine.el for more info."
nil)) ; for the cond
((save-restriction
- (narrow-to-region too-far-back (point-max))
- (setq ren (c-safe (c-sc-scan-lists pos -1 -1))))
-
+ (narrow-to-region too-far-back (point-max))
+ (setq ren (c-safe (c-sc-scan-lists pos -1 -1))))
;; CASE 3: After a }/)/] before `here''s BOL.
(list (1+ ren) (and dropped-cons pos) nil)) ; Return value
+ ((progn (setq good-pos (c-state-lit-beg (c-point 'bopl here-bol)))
+ (>= cache-pos good-pos))
+ ;; CASE 3.5: Just after an existing entry in `c-state-cache' on `here''s
+ ;; line or the previous line.
+ (list cache-pos nil nil))
+
(t
;; CASE 4; Best of a bad job: BOL before `here-bol', or beginning of
;; literal containing it.
- (setq good-pos (c-state-lit-beg (c-point 'bopl here-bol)))
(list good-pos (and dropped-cons good-pos) nil)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master d13dc27: Handling of `c-parse-state'. Fix low level bug.,
Alan Mackenzie <=