diff options
| author | Richard M. Stallman | 2002-07-23 19:25:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-07-23 19:25:27 +0000 |
| commit | fa1735d766e667ee34aadf7acea422acb9f1bfc4 (patch) | |
| tree | 4dc0db7fa275aabf2ff90cdc01c2d3bc8c1284a8 | |
| parent | 993397a67efd802a5053bc265706844e87213fd7 (diff) | |
| download | emacs-fa1735d766e667ee34aadf7acea422acb9f1bfc4.tar.gz emacs-fa1735d766e667ee34aadf7acea422acb9f1bfc4.zip | |
(undo, undo-more): Adjust messages when undoing in a region.
| -rw-r--r-- | lisp/simple.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index d1026e6ff6b..2b3193ced2d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -932,7 +932,9 @@ as an argument limits undo to changes within the current region." | |||
| 932 | (let ((modified (buffer-modified-p)) | 932 | (let ((modified (buffer-modified-p)) |
| 933 | (recent-save (recent-auto-save-p))) | 933 | (recent-save (recent-auto-save-p))) |
| 934 | (or (eq (selected-window) (minibuffer-window)) | 934 | (or (eq (selected-window) (minibuffer-window)) |
| 935 | (message "Undo!")) | 935 | (message (if (and transient-mark-mode mark-active) |
| 936 | "Undo in region!" | ||
| 937 | "Undo!"))) | ||
| 936 | (unless (eq last-command 'undo) | 938 | (unless (eq last-command 'undo) |
| 937 | (if (if transient-mark-mode mark-active (and arg (not (numberp arg)))) | 939 | (if (if transient-mark-mode mark-active (and arg (not (numberp arg)))) |
| 938 | (undo-start (region-beginning) (region-end)) | 940 | (undo-start (region-beginning) (region-end)) |
| @@ -979,7 +981,9 @@ Some change-hooks test this variable to do something different.") | |||
| 979 | Call `undo-start' to get ready to undo recent changes, | 981 | Call `undo-start' to get ready to undo recent changes, |
| 980 | then call `undo-more' one or more times to undo them." | 982 | then call `undo-more' one or more times to undo them." |
| 981 | (or pending-undo-list | 983 | (or pending-undo-list |
| 982 | (error "No further undo information")) | 984 | (error (format "No further undo information%s" |
| 985 | (if (and transient-mark-mode mark-active) | ||
| 986 | " for region" "")))) | ||
| 983 | (let ((undo-in-progress t)) | 987 | (let ((undo-in-progress t)) |
| 984 | (setq pending-undo-list (primitive-undo count pending-undo-list)))) | 988 | (setq pending-undo-list (primitive-undo count pending-undo-list)))) |
| 985 | 989 | ||