changeset 59157:349f61f37d67

(undo): Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Mon, 27 Dec 2004 22:12:39 +0000
parents 03a6e350cf4d
children add143f9cac9
files lisp/simple.el
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Mon Dec 27 20:56:56 2004 +0000
+++ b/lisp/simple.el	Mon Dec 27 22:12:39 2004 +0000
@@ -1263,7 +1263,10 @@
     (unless (and (eq last-command 'undo)
 		 ;; If something (a timer or filter?) changed the buffer
 		 ;; since the previous command, don't continue the undo seq.
-		 (eq undo-list-saved buffer-undo-list))
+		 (let ((list buffer-undo-list))
+		   (while (eq (car list) nil)
+		     (setq list (cdr list)))
+		   (eq undo-list-saved list)))
       (setq undo-in-region
 	    (if transient-mark-mode mark-active (and arg (not (numberp arg)))))
       (if undo-in-region
@@ -1527,8 +1530,9 @@
 ;; so it had better not do a lot of consing.
 (setq undo-outer-limit-function 'undo-outer-limit-truncate)
 (defun undo-outer-limit-truncate (size)
-  (if (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
-			   (buffer-name) size))
+  (if (let (use-dialog-box)
+	(yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
+			     (buffer-name) size)))
       (progn (setq buffer-undo-list nil) t)
     nil))