Commit 2512c9f0 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(undo): Don't let the undo entries for the undo

contain a specific buffer position.  Delete it if there is one.
parent 0321d75c
......@@ -615,6 +615,16 @@ A numeric argument serves as a repeat count."
(progn (undo-start)
(undo-more 1)))
(undo-more (or arg 1))
;; Don't specify a position in the undo record for the undo command.
;; Instead, undoing this should move point to where the change is.
(let ((tail buffer-undo-list)
(while (and tail (not done) (not (null (car tail))))
(if (integerp (car tail))
(setq done t)
(setq buffer-undo-list (delq (car tail) buffer-undo-list))))
(setq tail (cdr tail))))
(and modified (not (buffer-modified-p))
(delete-auto-save-file-if-necessary recent-save)))
;; If we do get all the way thru, make this-command indicate that.
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