changeset 22725:6d0f7798f157

(undo-in-progress): New variable. (undo-more): Bind it to t.
author Richard M. Stallman <rms@gnu.org>
date Thu, 09 Jul 1998 04:49:24 +0000
parents 6a6568360d51
children e44440f1a80e
files lisp/simple.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Thu Jul 09 04:45:33 1998 +0000
+++ b/lisp/simple.el	Thu Jul 09 04:49:24 1998 +0000
@@ -849,13 +849,18 @@
 (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.")
+
 (defun undo-more (count)
   "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 "No further undo information"))
-  (setq pending-undo-list (primitive-undo count pending-undo-list)))
+  (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)