aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorAlan Mackenzie2010-01-21 21:45:01 +0000
committerAlan Mackenzie2010-01-21 21:45:01 +0000
commit3e8f7d9196c6c5ccac68bfe4c083e541fc9922e0 (patch)
tree9904e9affebfa320ba82ecf78e2de9d4613369fe /lisp/progmodes
parentf0bd0ad525b8867540351715dda5743f8b4c4bd1 (diff)
downloademacs-3e8f7d9196c6c5ccac68bfe4c083e541fc9922e0.tar.gz
emacs-3e8f7d9196c6c5ccac68bfe4c083e541fc9922e0.zip
Fix a situation where deletion of a cpp construct throws an error.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-engine.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 0e6358aeee1..9d0af1d53ce 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2996,9 +2996,11 @@ comment at the start of cc-engine.el for more info."
2996 ;; containing point. We can then call `c-invalidate-state-cache-1' without 2996 ;; containing point. We can then call `c-invalidate-state-cache-1' without
2997 ;; worrying further about macros and template delimiters. 2997 ;; worrying further about macros and template delimiters.
2998 (c-with-<->-as-parens-suppressed 2998 (c-with-<->-as-parens-suppressed
2999 (if c-state-old-cpp-beg 2999 (if (and c-state-old-cpp-beg
3000 (< c-state-old-cpp-beg here))
3000 (c-with-all-but-one-cpps-commented-out 3001 (c-with-all-but-one-cpps-commented-out
3001 c-state-old-cpp-beg c-state-old-cpp-end 3002 c-state-old-cpp-beg
3003 (min c-state-old-cpp-end here)
3002 (c-invalidate-state-cache-1 here)) 3004 (c-invalidate-state-cache-1 here))
3003 (c-with-cpps-commented-out 3005 (c-with-cpps-commented-out
3004 (c-invalidate-state-cache-1 here))))) 3006 (c-invalidate-state-cache-1 here)))))
@@ -3029,8 +3031,9 @@ comment at the start of cc-engine.el for more info."
3029 (c-parse-state-1)) 3031 (c-parse-state-1))
3030 (c-with-cpps-commented-out 3032 (c-with-cpps-commented-out
3031 (c-parse-state-1)))) 3033 (c-parse-state-1))))
3032 (setq c-state-old-cpp-beg here-cpp-beg 3034 (setq c-state-old-cpp-beg (and here-cpp-beg (copy-marker here-cpp-beg t))
3033 c-state-old-cpp-end here-cpp-end)))) 3035 c-state-old-cpp-end (and here-cpp-end (copy-marker here-cpp-end t)))
3036 )))
3034 3037
3035;; Debug tool to catch cache inconsistencies. This is called from 3038;; Debug tool to catch cache inconsistencies. This is called from
3036;; 000tests.el. 3039;; 000tests.el.