From xemacs-m  Fri Jan 31 22:59:39 1997
Received: from localhost.interport.net (ts3port29.port.net [207.38.249.29])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id WAA21207
	for <xemacs-beta@xemacs.org>; Fri, 31 Jan 1997 22:59:37 -0600 (CST)
Received: (from pez@localhost) by localhost.interport.net (8.7.4/8.7.3) id AAA03861; Sat, 1 Feb 1997 00:02:25 -0500
Date: Sat, 1 Feb 1997 00:02:25 -0500
Message-Id: <199702010502.AAA03861@localhost.interport.net>
From: Peter Pezaris <pez@dwwc.com>
To: xemacs-beta@xemacs.org
Subject: Undo!
Reply-To: pez@dwwc.com


It always kind of bugged me that when you do multiple undos in
XEmacs there is no visible feedback.  Some undo invocations don't
have any effect on the buffer, and you sit there wondering "Did that
really undo something, or is XEmacs just being slow?" The minibuffer
stares at you saying "Undo!" but you're not sure if it was from this
invocation of undo or the previous.  I inevitably hit C-_ one too
many times, swear, then C-n, then C-_ again.  The problem with this
approach is that since XEmacs doesn't support an undo/redo paradigm,
you end up with undo histories that are three-steps-forward,
two-steps-back, four-steps-forward, one-steps-back.  Not exactly
ideal.

Enough rambling.  This patch is a very simple one.  Undo now says
"Undo" in the minibuffer when it starts it's work, and "Undo!" when
it's finished.  This way at least you get visual feedback and know
when the undo command is complete.

I thought it would be a little much to have "Undoing..." then
"Undoing... done" even though this is more of a "standard."
(Although I wouldn't be opposed to that change if there is a
consensus)

-Pez

*** simple.el~  Fri Jan 31 23:51:01 1997
--- simple.el   Fri Jan 31 23:51:17 1997
***************
*** 670,676 ****
    (let ((modified (buffer-modified-p))
        (recent-save (recent-auto-save-p)))
      (or (eq (selected-window) (minibuffer-window))
!       (message "Undo!"))
      (or (and (eq last-command 'undo)
             (eq (current-buffer) last-undo-buffer)) ; XEmacs
        (progn (undo-start)
--- 670,676 ----
    (let ((modified (buffer-modified-p))
        (recent-save (recent-auto-save-p)))
      (or (eq (selected-window) (minibuffer-window))
!       (message "Undo"))
      (or (and (eq last-command 'undo)
             (eq (current-buffer) last-undo-buffer)) ; XEmacs
        (progn (undo-start)
***************
*** 688,693 ****
--- 688,695 ----
        (setq tail (cdr tail))))
      (and modified (not (buffer-modified-p))
         (delete-auto-save-file-if-necessary recent-save)))
+   (or (eq (selected-window) (minibuffer-window))
+       (message "Undo!"))
    ;; If we do get all the way through, make this-command indicate that.
    (setq this-command 'undo))
  

