emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No more messages "No further undo information"


From: Richard Stallman
Subject: Re: No more messages "No further undo information"
Date: Mon, 24 Jan 2005 01:50:03 -0500

    Currently, when all recorded changes have already been undone
    with `C-_', the undo command don't display the error message
    "No further undo information".  Instead of that, it starts redoing
    immediately after the limit of the undo info is reached.

Does this give good results?

*** simple.el   22 Jan 2005 07:59:32 -0500      1.684
--- simple.el   23 Jan 2005 12:52:52 -0500      
***************
*** 1258,1271 ****
      (setq this-command 'undo-start)
  
      (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.
!                (let ((list buffer-undo-list))
!                  (while (eq (car list) nil)
!                    (setq list (cdr list)))
!                  ;; If the last undo record made was made by undo
!                  ;; it shows nothing else happened in between.
!                  (gethash list undo-equiv-table)))
        (setq undo-in-region
            (if transient-mark-mode mark-active (and arg (not (numberp arg)))))
        (if undo-in-region
--- 1258,1272 ----
      (setq this-command 'undo-start)
  
      (unless (and (eq last-command 'undo)
!                (or (eq pending-undo-list t)
!                    ;; If something (a timer or filter?) changed the buffer
!                    ;; since the previous command, don't continue the undo seq.
!                    (let ((list buffer-undo-list))
!                      (while (eq (car list) nil)
!                        (setq list (cdr list)))
!                      ;; If the last undo record made was made by undo
!                      ;; it shows nothing else happened in between.
!                      (gethash list undo-equiv-table))))
        (setq undo-in-region
            (if transient-mark-mode mark-active (and arg (not (numberp arg)))))
        (if undo-in-region
***************
*** 1351,1362 ****
    "Undo back N undo-boundaries beyond what was already undone recently.
  Call `undo-start' to get ready to undo recent changes,
  then call `undo-more' one or more times to undo them."
!   (or pending-undo-list
        (error (format "No further undo information%s"
                     (if (and transient-mark-mode mark-active)
                         " for region" ""))))
    (let ((undo-in-progress t))
!     (setq pending-undo-list (primitive-undo count pending-undo-list))))
  
  ;; Deep copy of a list
  (defun undo-copy-list (list)
--- 1352,1365 ----
    "Undo back N undo-boundaries beyond what was already undone recently.
  Call `undo-start' to get ready to undo recent changes,
  then call `undo-more' one or more times to undo them."
!   (or (listp pending-undo-list)
        (error (format "No further undo information%s"
                     (if (and transient-mark-mode mark-active)
                         " for region" ""))))
    (let ((undo-in-progress t))
!     (setq pending-undo-list (primitive-undo count pending-undo-list))
!     (if (null pending-undo-list)
!       (setq pending-undo-list t))))
  
  ;; Deep copy of a list
  (defun undo-copy-list (list)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]