# HG changeset patch # User Richard M. Stallman # Date 1104185559 0 # Node ID 349f61f37d67c96dd0111f43147f82972a5f85a0 # Parent 03a6e350cf4d32c40a77248e3a02cf110144cf0e (undo): Fix previous change. diff -r 03a6e350cf4d -r 349f61f37d67 lisp/simple.el --- 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))