aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/simple.el10
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index acc2703044e..93956a4c258 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12009-03-14 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * simple.el (undo): Don't loop when encountering empty undo records.
4
12009-03-13 Tassilo Horn <tassilo@member.fsf.org> 52009-03-13 Tassilo Horn <tassilo@member.fsf.org>
2 6
3 * doc-view.el (doc-view-mode-map): Bind RET to image-next-line. 7 * doc-view.el (doc-view-mode-map): Bind RET to image-next-line.
diff --git a/lisp/simple.el b/lisp/simple.el
index 8ffe5912865..d758fc1f0a7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1682,9 +1682,13 @@ as an argument limits undo to changes within the current region."
1682 ;; In the ordinary case (not within a region), map the redo 1682 ;; In the ordinary case (not within a region), map the redo
1683 ;; record to the following undos. 1683 ;; record to the following undos.
1684 ;; I don't know how to do that in the undo-in-region case. 1684 ;; I don't know how to do that in the undo-in-region case.
1685 (puthash buffer-undo-list 1685 (let ((list buffer-undo-list))
1686 (if undo-in-region t pending-undo-list) 1686 ;; Strip any leading undo boundaries there might be, like we do
1687 undo-equiv-table) 1687 ;; above when checking.
1688 (while (eq (car list) nil)
1689 (setq list (cdr list)))
1690 (puthash list (if undo-in-region t pending-undo-list)
1691 undo-equiv-table))
1688 ;; Don't specify a position in the undo record for the undo command. 1692 ;; Don't specify a position in the undo record for the undo command.
1689 ;; Instead, undoing this should move point to where the change is. 1693 ;; Instead, undoing this should move point to where the change is.
1690 (let ((tail buffer-undo-list) 1694 (let ((tail buffer-undo-list)