changeset 1430:f680a6fb6661

(rmail-sort-messages): Give up right away if not Rmail mode.
author Richard M. Stallman <rms@gnu.org>
date Sun, 18 Oct 1992 19:10:56 +0000
parents 14a2a89cb634
children 240d5fe38595
files lisp/mail/rmailsort.el
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsort.el	Sun Oct 18 19:03:45 1992 +0000
+++ b/lisp/mail/rmailsort.el	Sun Oct 18 19:10:56 1992 +0000
@@ -116,6 +116,8 @@
   "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...")