cc-engine.el (c-remove-stale-state-cache): Fix off-by-one error. Fixes
authorAlan Mackenzie <acm@muc.de>
Mon, 22 Mar 2010 17:21:22 +0000 (17:21 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 22 Mar 2010 17:21:22 +0000 (17:21 +0000)
bug #5747.

lisp/ChangeLog
lisp/progmodes/cc-engine.el

index 1d650a2..98ebc73 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-22  Alan Mackenzie  <acm@muc.de>
+
+       * progmodes/cc-engine.el (c-remove-stale-state-cache): Fix
+       off-by-one error.  Fixes bug #5747.
+
 2010-03-22  Juanma Barranquero  <lekktu@gmail.com>
 
        * image-dired.el (image-dired-display-thumbs): Fix typo in docstring.
index f4a8c0b..2d28d00 100644 (file)
@@ -2624,7 +2624,7 @@ comment at the start of cc-engine.el for more info."
                           (< (point-max) c-state-old-cpp-end)))
                  (point-max)
                (min (point-max) c-state-old-cpp-beg)))
-       (while (and c-state-cache (> (c-state-cache-top-lparen) upper-lim))
+       (while (and c-state-cache (>= (c-state-cache-top-lparen) upper-lim))
          (setq c-state-cache (cdr c-state-cache)))
        ;; If `upper-lim' is inside the last recorded brace pair, remove its
        ;; RBrace and indicate we'll need to search backwards for a previous