emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/simple.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el
Date: Sat, 29 Jan 2005 12:24:41 -0500

Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.686 emacs/lisp/simple.el:1.687
*** emacs/lisp/simple.el:1.686  Sun Jan 23 13:28:16 2005
--- emacs/lisp/simple.el        Sat Jan 29 17:24:41 2005
***************
*** 1235,1240 ****
--- 1235,1244 ----
  (defvar undo-no-redo nil
    "If t, `undo' doesn't go through redo entries.")
  
+ (defvar pending-undo-list nil
+   "Within a run of consecutive undo commands, list remaining to be undone.
+ t if we undid all the way to the end of it.")
+ 
  (defun undo (&optional arg)
    "Undo some previous changes.
  Repeat this command to undo more changes.
***************
*** 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
--- 1262,1276 ----
      (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
***************
*** 1340,1348 ****
  ;; no idea whereas to bind it.  Any suggestion welcome.  -stef
  ;; (define-key ctl-x-map "U" 'undo-only)
  
- (defvar pending-undo-list nil
-   "Within a run of consecutive undo commands, list remaining to be undone.")
- 
  (defvar undo-in-progress nil
    "Non-nil while performing an undo.
  Some change-hooks test this variable to do something different.")
--- 1345,1350 ----
***************
*** 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)
--- 1353,1366 ----
    "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]