summaryrefslogtreecommitdiff
path: root/lisp/mail/rmailsort.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1992-10-18 19:10:56 +0000
committerRichard M. Stallman <rms@gnu.org>1992-10-18 19:10:56 +0000
commitd0c9169e2bf24c080afd4cd2a8a394efae36d052 (patch)
tree0f82c63d2f5b93dc954ba489afc537d12de5aa43 /lisp/mail/rmailsort.el
parenta2a05344bea5813ecd3faff09536a83ea1629a76 (diff)
downloademacs-d0c9169e2bf24c080afd4cd2a8a394efae36d052.tar.gz
(rmail-sort-messages): Give up right away if not Rmail mode.
Diffstat (limited to 'lisp/mail/rmailsort.el')
-rw-r--r--lisp/mail/rmailsort.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el
index 397e2d62f51..2ad4277a41d 100644
--- a/lisp/mail/rmailsort.el
+++ b/lisp/mail/rmailsort.el
@@ -116,6 +116,8 @@ If prefix argument REVERSE is non-nil, sort them in reverse order."
"Sort messages of current Rmail file.
1st argument REVERSE is non-nil, sort them in reverse order.
2nd argument KEYFUNC is called with message number, and should return a key."
+ (or (eq major-mode 'rmail-mode)
+ (error "Current buffer not in Rmail mode"))
(let ((buffer-read-only nil)
(sort-lists nil))
(message "Finding sort keys...")