aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2010-03-22 17:21:22 +0000
committerAlan Mackenzie2010-03-22 17:21:22 +0000
commit657071fc073b054db83168daffbbc1ce8ff89527 (patch)
tree67dd156310ed043646c2336ab9eebdb50c520f63
parentceb245fc3845bf23141eb5f0718f203833df0fb9 (diff)
downloademacs-657071fc073b054db83168daffbbc1ce8ff89527.tar.gz
emacs-657071fc073b054db83168daffbbc1ce8ff89527.zip
cc-engine.el (c-remove-stale-state-cache): Fix off-by-one error. Fixes
bug #5747.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/cc-engine.el2
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1d650a2ef58..98ebc73fd3e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12010-03-22 Alan Mackenzie <acm@muc.de>
2
3 * progmodes/cc-engine.el (c-remove-stale-state-cache): Fix
4 off-by-one error. Fixes bug #5747.
5
12010-03-22 Juanma Barranquero <lekktu@gmail.com> 62010-03-22 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * image-dired.el (image-dired-display-thumbs): Fix typo in docstring. 8 * image-dired.el (image-dired-display-thumbs): Fix typo in docstring.
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index f4a8c0bf46f..2d28d003fd5 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2624,7 +2624,7 @@ comment at the start of cc-engine.el for more info."
2624 (< (point-max) c-state-old-cpp-end))) 2624 (< (point-max) c-state-old-cpp-end)))
2625 (point-max) 2625 (point-max)
2626 (min (point-max) c-state-old-cpp-beg))) 2626 (min (point-max) c-state-old-cpp-beg)))
2627 (while (and c-state-cache (> (c-state-cache-top-lparen) upper-lim)) 2627 (while (and c-state-cache (>= (c-state-cache-top-lparen) upper-lim))
2628 (setq c-state-cache (cdr c-state-cache))) 2628 (setq c-state-cache (cdr c-state-cache)))
2629 ;; If `upper-lim' is inside the last recorded brace pair, remove its 2629 ;; If `upper-lim' is inside the last recorded brace pair, remove its
2630 ;; RBrace and indicate we'll need to search backwards for a previous 2630 ;; RBrace and indicate we'll need to search backwards for a previous