From 52d1110dca4467773c37693467c666e838836799 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 9 Jul 1998 04:49:24 +0000 Subject: [PATCH] (undo-in-progress): New variable. (undo-more): Bind it to t. --- lisp/simple.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index ca083f963d5..e5fa2386320 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -849,13 +849,18 @@ Likewise in Transient Mark mode when the mark is active." (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) -- 2.39.5