diff options
| author | Alan Mackenzie | 2016-02-17 11:53:01 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-02-17 11:53:01 +0000 |
| commit | 2abcb06cab03cf9040348146fcc0e3e93ae24a58 (patch) | |
| tree | 5b119462f5920fa6df62b8c4078b97fb0c5a4236 | |
| parent | 14aec913ac3f0dd408487c0e8327403e0f239964 (diff) | |
| download | emacs-2abcb06cab03cf9040348146fcc0e3e93ae24a58.tar.gz emacs-2abcb06cab03cf9040348146fcc0e3e93ae24a58.zip | |
Correct c-parse-state cache manipulation error.
* lisp/progmodes/cc-engine.el (c-invalidate-state-cache-1): Correct a
comparison bound. Amend comments.
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index d4dcb1ca0e8..69a2a53d5c9 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -3241,7 +3241,7 @@ comment at the start of cc-engine.el for more info." | |||
| 3241 | ;; pair element into an open paren element. Doing that would mean that the | 3241 | ;; pair element into an open paren element. Doing that would mean that the |
| 3242 | ;; new open paren wouldn't have the required preceding paren pair element. | 3242 | ;; new open paren wouldn't have the required preceding paren pair element. |
| 3243 | ;; | 3243 | ;; |
| 3244 | ;; This function is called from c-after-change. | 3244 | ;; This function is called from c-before-change. |
| 3245 | 3245 | ||
| 3246 | ;; The caches of non-literals: | 3246 | ;; The caches of non-literals: |
| 3247 | ;; Note that we use "<=" for the possibility of the second char of a two-char | 3247 | ;; Note that we use "<=" for the possibility of the second char of a two-char |
| @@ -3265,7 +3265,7 @@ comment at the start of cc-engine.el for more info." | |||
| 3265 | ;; below `here'. To maintain its consistency, we may need to insert a new | 3265 | ;; below `here'. To maintain its consistency, we may need to insert a new |
| 3266 | ;; brace pair. | 3266 | ;; brace pair. |
| 3267 | (let ((here-bol (c-point 'bol here)) | 3267 | (let ((here-bol (c-point 'bol here)) |
| 3268 | too-high-pa ; recorded {/(/[ next above here, or nil. | 3268 | too-high-pa ; recorded {/(/[ next above or just below here, or nil. |
| 3269 | dropped-cons ; was the last removed element a brace pair? | 3269 | dropped-cons ; was the last removed element a brace pair? |
| 3270 | pa) | 3270 | pa) |
| 3271 | ;; The easy bit - knock over-the-top bits off `c-state-cache'. | 3271 | ;; The easy bit - knock over-the-top bits off `c-state-cache'. |
| @@ -3277,7 +3277,7 @@ comment at the start of cc-engine.el for more info." | |||
| 3277 | 3277 | ||
| 3278 | ;; Do we need to add in an earlier brace pair, having lopped one off? | 3278 | ;; Do we need to add in an earlier brace pair, having lopped one off? |
| 3279 | (if (and dropped-cons | 3279 | (if (and dropped-cons |
| 3280 | (< too-high-pa (+ here c-state-cache-too-far))) | 3280 | (<= too-high-pa here)) |
| 3281 | (c-append-lower-brace-pair-to-state-cache too-high-pa here here-bol)) | 3281 | (c-append-lower-brace-pair-to-state-cache too-high-pa here here-bol)) |
| 3282 | (setq c-state-cache-good-pos (or (c-state-cache-after-top-paren) | 3282 | (setq c-state-cache-good-pos (or (c-state-cache-after-top-paren) |
| 3283 | (c-state-get-min-scan-pos))))) | 3283 | (c-state-get-min-scan-pos))))) |