changeset 46647:cdd51b0b1929

(undo, undo-more): Adjust messages when undoing in a region.
author Richard M. Stallman <rms@gnu.org>
date Tue, 23 Jul 2002 19:25:27 +0000
parents ba559abe46e6
children afaa97555f79
files lisp/simple.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Tue Jul 23 19:24:03 2002 +0000
+++ b/lisp/simple.el	Tue Jul 23 19:25:27 2002 +0000
@@ -932,7 +932,9 @@
   (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 @@
 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))))