# HG changeset patch # User Richard M. Stallman # Date 899959764 0 # Node ID 6d0f7798f1579c3c3e9a57163a4280f88313f48a # Parent 6a6568360d5108f8c141627518b9998974a2e85d (undo-in-progress): New variable. (undo-more): Bind it to t. diff -r 6a6568360d51 -r 6d0f7798f157 lisp/simple.el --- 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)