From e829899894bb613d8d3d9f8e92c5a7ee4edd324a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 27 Dec 2004 22:12:53 +0000 Subject: (undo): Fix previous change. --- lisp/ChangeLog | 18 +++++++++++++++++- lisp/simple.el | 10 +++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f3f943a52a..22fac866e3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2004-12-27 Richard M. Stallman + + * simple.el (undo): Fix previous change. + 2004-12-27 YAMAMOTO Mitsuharu * term/mac-win.el: Sync with x-win.el. Rearrange the contents. @@ -6,6 +10,16 @@ 2004-12-27 Richard M. Stallman + * files.el (buffer-save-without-query): New var (buffer-local). + (save-some-buffers): Save those buffers first, w/o asking. + + * files.el (insert-directory-ls-version): New variable. + (insert-directory): When ls returns an error, test the version + number to decide what the return code means. + With --dired output format, detect and distinguish lines + that are really error messages. + (insert-directory-adj-pos): New function. + * bookmark.el (bookmark-jump): Nice error if BOOKMARK is nil. * battery.el (battery-mode-line-format): Remove initial spaces. @@ -59,7 +73,9 @@ * simple.el (undo-list-saved): New variable (buffer-local). (undo): Set and test it. - + (buffer-disable-undo): Moved here from buffer.c. + Clear out undo-list-saved. + * international/mule.el (decode-coding-inserted-region): Set buffer-undo-list in a correct and optimal way. diff --git a/lisp/simple.el b/lisp/simple.el index 008d52eabc..b2c6d9df86 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1263,7 +1263,10 @@ as an argument limits undo to changes within the current region." (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 @@ is not *inside* the region START...END." ;; 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)) -- cgit v1.2.3