[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99389: Fix a situation where deletio
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99389: Fix a situation where deletion of a cpp construct throws an error. |
Date: |
Thu, 21 Jan 2010 21:45:01 +0000 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 99389
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Thu 2010-01-21 21:45:01 +0000
message:
Fix a situation where deletion of a cpp construct throws an error.
modified:
lisp/ChangeLog
lisp/progmodes/cc-engine.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-01-21 14:03:10 +0000
+++ b/lisp/ChangeLog 2010-01-21 21:45:01 +0000
@@ -1,3 +1,11 @@
+2010-01-21 Alan Mackenzie <address@hidden>
+
+ Fix a situation where deletion of a cpp construct throws an error.
+ * progmodes/cc-engine.el (c-invalidate-state-cache): Before
+ invoking c-with-all-but-one-cpps-commented-out, check that the
+ special cpp construct is still in the buffer.
+ (c-parse-state): Record the special cpp with markers, not numbers.
+
2010-01-21 Kenichi Handa <address@hidden>
* textmodes/sgml-mode.el (sgml-maybe-name-self): No need to
=== modified file 'lisp/progmodes/cc-engine.el'
--- a/lisp/progmodes/cc-engine.el 2010-01-14 18:37:23 +0000
+++ b/lisp/progmodes/cc-engine.el 2010-01-21 21:45:01 +0000
@@ -2996,9 +2996,11 @@
;; containing point. We can then call `c-invalidate-state-cache-1' without
;; worrying further about macros and template delimiters.
(c-with-<->-as-parens-suppressed
- (if c-state-old-cpp-beg
+ (if (and c-state-old-cpp-beg
+ (< c-state-old-cpp-beg here))
(c-with-all-but-one-cpps-commented-out
- c-state-old-cpp-beg c-state-old-cpp-end
+ c-state-old-cpp-beg
+ (min c-state-old-cpp-end here)
(c-invalidate-state-cache-1 here))
(c-with-cpps-commented-out
(c-invalidate-state-cache-1 here)))))
@@ -3029,8 +3031,9 @@
(c-parse-state-1))
(c-with-cpps-commented-out
(c-parse-state-1))))
- (setq c-state-old-cpp-beg here-cpp-beg
- c-state-old-cpp-end here-cpp-end))))
+ (setq c-state-old-cpp-beg (and here-cpp-beg (copy-marker here-cpp-beg t))
+ c-state-old-cpp-end (and here-cpp-end (copy-marker here-cpp-end t)))
+ )))
;; Debug tool to catch cache inconsistencies. This is called from
;; 000tests.el.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99389: Fix a situation where deletion of a cpp construct throws an error.,
Alan Mackenzie <=