]> git.eshelyaron.com Git - emacs.git/commitdiff
(undo, undo-more): Adjust messages when undoing in a region.
authorRichard M. Stallman <rms@gnu.org>
Tue, 23 Jul 2002 19:25:27 +0000 (19:25 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 23 Jul 2002 19:25:27 +0000 (19:25 +0000)
lisp/simple.el

index d1026e6ff6bf7390a37192f3e270636a4f1c9a37..2b3193ced2df4f9c07831b38ca2f24e9725dc6ed 100644 (file)
@@ -932,7 +932,9 @@ as an argument limits undo to changes within the current region."
   (let ((modified (buffer-modified-p))
        (recent-save (recent-auto-save-p)))
     (or (eq (selected-window) (minibuffer-window))
-       (message "Undo!"))
+       (message (if (and transient-mark-mode mark-active) 
+                    "Undo in region!"
+                  "Undo!")))
     (unless (eq last-command 'undo)
       (if (if transient-mark-mode mark-active (and arg (not (numberp arg))))
          (undo-start (region-beginning) (region-end))
@@ -979,7 +981,9 @@ Some change-hooks test this variable to do something different.")
 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"))
+      (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))))