aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-03-16 23:41:32 +0000
committerRichard M. Stallman1994-03-16 23:41:32 +0000
commit2512c9f0f0e6cc71c601ffdb0690b9cf5642734b (patch)
tree5b54862fec45db27e8a7713bd2542db336a7cd3a
parent0321d75c24a3c5c88740773fd9be4c168b15a5ee (diff)
downloademacs-2512c9f0f0e6cc71c601ffdb0690b9cf5642734b.tar.gz
emacs-2512c9f0f0e6cc71c601ffdb0690b9cf5642734b.zip
(undo): Don't let the undo entries for the undo
contain a specific buffer position. Delete it if there is one.
-rw-r--r--lisp/simple.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 66f0003bf4d..cc2e4c6d801 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -615,6 +615,16 @@ A numeric argument serves as a repeat count."
615 (progn (undo-start) 615 (progn (undo-start)
616 (undo-more 1))) 616 (undo-more 1)))
617 (undo-more (or arg 1)) 617 (undo-more (or arg 1))
618 ;; Don't specify a position in the undo record for the undo command.
619 ;; Instead, undoing this should move point to where the change is.
620 (let ((tail buffer-undo-list)
621 done)
622 (while (and tail (not done) (not (null (car tail))))
623 (if (integerp (car tail))
624 (progn
625 (setq done t)
626 (setq buffer-undo-list (delq (car tail) buffer-undo-list))))
627 (setq tail (cdr tail))))
618 (and modified (not (buffer-modified-p)) 628 (and modified (not (buffer-modified-p))
619 (delete-auto-save-file-if-necessary recent-save))) 629 (delete-auto-save-file-if-necessary recent-save)))
620 ;; If we do get all the way thru, make this-command indicate that. 630 ;; If we do get all the way thru, make this-command indicate that.