Commit 86f0d932 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(undo): Don't loop when encountering empty undo records.

parent 7dae1ce2
2009-03-14 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (undo): Don't loop when encountering empty undo records.
2009-03-13 Tassilo Horn <tassilo@member.fsf.org> 2009-03-13 Tassilo Horn <tassilo@member.fsf.org>
   
* doc-view.el (doc-view-mode-map): Bind RET to image-next-line. * doc-view.el (doc-view-mode-map): Bind RET to image-next-line.
......
...@@ -1682,9 +1682,13 @@ as an argument limits undo to changes within the current region." ...@@ -1682,9 +1682,13 @@ as an argument limits undo to changes within the current region."
;; In the ordinary case (not within a region), map the redo ;; In the ordinary case (not within a region), map the redo
;; record to the following undos. ;; record to the following undos.
;; I don't know how to do that in the undo-in-region case. ;; I don't know how to do that in the undo-in-region case.
(puthash buffer-undo-list (let ((list buffer-undo-list))
(if undo-in-region t pending-undo-list) ;; Strip any leading undo boundaries there might be, like we do
undo-equiv-table) ;; above when checking.
(while (eq (car list) nil)
(setq list (cdr list)))
(puthash list (if undo-in-region t pending-undo-list)
undo-equiv-table))
;; Don't specify a position in the undo record for the undo command. ;; Don't specify a position in the undo record for the undo command.
;; Instead, undoing this should move point to where the change is. ;; Instead, undoing this should move point to where the change is.
(let ((tail buffer-undo-list) (let ((tail buffer-undo-list)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment