From d0c9169e2bf24c080afd4cd2a8a394efae36d052 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 18 Oct 1992 19:10:56 +0000 Subject: [PATCH] (rmail-sort-messages): Give up right away if not Rmail mode. --- lisp/mail/rmailsort.el | 2 ++ 1 file changed, 2 insertions(+) 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...")