# HG changeset patch # User Richard M. Stallman # Date 719435456 0 # Node ID f680a6fb666110cc8b7b7ab5dd5688dfeb509a22 # Parent 14a2a89cb634375270c2c5f83004375c2fe066e7 (rmail-sort-messages): Give up right away if not Rmail mode. diff -r 14a2a89cb634 -r f680a6fb6661 lisp/mail/rmailsort.el --- 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...")