aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-22 05:55:59 +0000
committerRichard M. Stallman1993-06-22 05:55:59 +0000
commite45fce035979831b31bdadbff232e5039d16f816 (patch)
tree7437b3a319147a4d00ff7008b79b8e2d13ede094
parent8b1d5b3126b1dd49dcd954a470c29101f11afe04 (diff)
downloademacs-e45fce035979831b31bdadbff232e5039d16f816.tar.gz
emacs-e45fce035979831b31bdadbff232e5039d16f816.zip
(rmail-summary-mode-map): Bind summary sort commands.
(rmail-summary-sort-...): Moved from rmailsort.el. (rmail-sort-from-summary): Likewise. Require rmailsort.
-rw-r--r--lisp/mail/rmailsum.el57
1 files changed, 57 insertions, 0 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 9e5df68e249..efeccb9adde 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -586,6 +586,18 @@ Instead, all of the Rmail Mode commands are available, plus:
586 (define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up) 586 (define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up)
587 (define-key rmail-summary-mode-map "\177" 'rmail-summary-scroll-msg-down) 587 (define-key rmail-summary-mode-map "\177" 'rmail-summary-scroll-msg-down)
588 (define-key rmail-summary-mode-map "?" 'describe-mode) 588 (define-key rmail-summary-mode-map "?" 'describe-mode)
589 (define-key rmail-summary-mode-map "\C-c\C-s\C-d"
590 'rmail-summary-sort-by-date)
591 (define-key rmail-summary-mode-map "\C-c\C-s\C-s"
592 'rmail-summary-sort-by-subject)
593 (define-key rmail-summary-mode-map "\C-c\C-s\C-a"
594 'rmail-summary-sort-by-author)
595 (define-key rmail-summary-mode-map "\C-c\C-s\C-r"
596 'rmail-summary-sort-by-recipient)
597 (define-key rmail-summary-mode-map "\C-c\C-s\C-c"
598 'rmail-summary-sort-by-correspondent)
599 (define-key rmail-summary-mode-map "\C-c\C-s\C-l"
600 'rmail-summary-sort-by-lines)
589 ) 601 )
590 602
591;;; Menu bar bindings. 603;;; Menu bar bindings.
@@ -1010,5 +1022,50 @@ buffer visiting that file."
1010 (save-excursion 1022 (save-excursion
1011 (set-buffer rmail-buffer) 1023 (set-buffer rmail-buffer)
1012 (call-interactively 'rmail-output))) 1024 (call-interactively 'rmail-output)))
1025
1026;; Sorting messages in Rmail Summary buffer.
1027
1028(defun rmail-summary-sort-by-date (reverse)
1029 "Sort messages of current Rmail summary by date.
1030If prefix argument REVERSE is non-nil, sort them in reverse order."
1031 (interactive "P")
1032 (rmail-sort-from-summary (function rmail-sort-by-date) reverse))
1033
1034(defun rmail-summary-sort-by-subject (reverse)
1035 "Sort messages of current Rmail summary by subject.
1036If prefix argument REVERSE is non-nil, sort them in reverse order."
1037 (interactive "P")
1038 (rmail-sort-from-summary (function rmail-sort-by-subject) reverse))
1039
1040(defun rmail-summary-sort-by-author (reverse)
1041 "Sort messages of current Rmail summary by author.
1042If prefix argument REVERSE is non-nil, sort them in reverse order."
1043 (interactive "P")
1044 (rmail-sort-from-summary (function rmail-sort-by-author) reverse))
1045
1046(defun rmail-summary-sort-by-recipient (reverse)
1047 "Sort messages of current Rmail summary by recipient.
1048If prefix argument REVERSE is non-nil, sort them in reverse order."
1049 (interactive "P")
1050 (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse))
1051
1052(defun rmail-summary-sort-by-correspondent (reverse)
1053 "Sort messages of current Rmail summary by other correspondent.
1054If prefix argument REVERSE is non-nil, sort them in reverse order."
1055 (interactive "P")
1056 (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse))
1057
1058(defun rmail-summary-sort-by-lines (reverse)
1059 "Sort messages of current Rmail summary by lines of the message.
1060If prefix argument REVERSE is non-nil, sort them in reverse order."
1061 (interactive "P")
1062 (rmail-sort-from-summary (function rmail-sort-by-lines) reverse))
1063
1064(defun rmail-sort-from-summary (sortfun reverse)
1065 "Sort Rmail messages from Summary buffer and update it after sorting."
1066 (require 'rmailsort)
1067 (pop-to-buffer rmail-buffer)
1068 (funcall sortfun reverse)
1069 (rmail-summary))
1013 1070
1014;;; rmailsum.el ends here 1071;;; rmailsum.el ends here