]> code.delx.au - gnu-emacs/commitdiff
Fix bug #5649: 23.1.92; Indentation problems in C mode.
authorAlan Mackenzie <acm@muc.de>
Mon, 1 Mar 2010 11:31:42 +0000 (11:31 +0000)
committerAlan Mackenzie <acm@muc.de>
Mon, 1 Mar 2010 11:31:42 +0000 (11:31 +0000)
lisp/ChangeLog
lisp/progmodes/cc-engine.el

index f69df07cf2caa12767a022bf9e175f0e48c12b19..725377aba958f0dc327cfa97a9fd833b6090294b 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-01  Alan Mackenzie  <bug-cc-mode@gnu.org>
+
+       * cc-engine.el (c-remove-stale-state-cache): Take account of when
+       `good-pos' is in the same macro as `here'.  Fixes bug 5649.
+
 2010-02-28  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * menu-bar.el (menu-bar-manuals-menu): Fix typo.
index 336e2c392627de2a5d557397b52bb43bda28214d..4797cd4a8cab8725dbd9e21103a6e7de72b7f668 100644 (file)
@@ -2641,7 +2641,8 @@ comment at the start of cc-engine.el for more info."
        ;; (car c-state-cache).  There can be no open parens/braces/brackets
        ;; between `good-pos'/`good-pos-actual-macro-start' and (point-max),
        ;; due to the interface spec to this function.
-       (setq pos (if good-pos-actual-macro-end
+       (setq pos (if (and good-pos-actual-macro-end
+                          (> in-macro-start good-pos-actual-macro-start))
                      (1+ good-pos-actual-macro-end) ; get outside the macro as
                                        ; marked by a `category' text property.
                    good-pos))