Mercurial > emacs
changeset 6717:2121bf252398
(rmail-summary-sort-by-keywords): New function.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 07 Apr 1994 03:28:44 +0000 |
parents | 9ce2d1a2c155 |
children | c13953896b24 |
files | lisp/mail/rmailsum.el |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el Thu Apr 07 03:11:50 1994 +0000 +++ b/lisp/mail/rmailsum.el Thu Apr 07 03:28:44 1994 +0000 @@ -509,7 +509,8 @@ \\[rmail-summary-sort-by-author] Sort by author. \\[rmail-summary-sort-by-recipient] Sort by recipient. \\[rmail-summary-sort-by-correspondent] Sort by correspondent. -\\[rmail-summary-sort-by-lines] Sort by lines." +\\[rmail-summary-sort-by-lines] Sort by lines. +\\[rmail-summary-sort-by-keywords] Sort by keywords." (interactive) (kill-all-local-variables) (setq major-mode 'rmail-summary-mode) @@ -623,6 +624,8 @@ 'rmail-summary-sort-by-correspondent) (define-key rmail-summary-mode-map "\C-c\C-s\C-l" 'rmail-summary-sort-by-lines) + (define-key rmail-summary-mode-map "\C-c\C-s\C-k" + 'rmail-summary-sort-by-keywords) ) ;;; Menu bar bindings. @@ -1108,6 +1111,16 @@ (interactive "P") (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) +(defun rmail-summary-sort-by-keywords (reverse labels) + "Sort messages of current Rmail summary by keywords. +If prefix argument REVERSE is non-nil, sort them in reverse order. +KEYWORDS is a comma-separated list of labels." + (interactive "P\nsSort by labels: ") + (rmail-sort-from-summary + (function (lambda (reverse) + (rmail-sort-by-keywords reverse labels))) + reverse)) + (defun rmail-sort-from-summary (sortfun reverse) "Sort Rmail messages from Summary buffer and update it after sorting." (require 'rmailsort)