diff options
| author | Karl Heuer | 1994-04-07 03:28:44 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-04-07 03:28:44 +0000 |
| commit | ebdf372b3b04440406cdd4b3fbc9a6c093b1a8b1 (patch) | |
| tree | 0799c6290c71fd3cc027e00289ab1ed9ce14b142 | |
| parent | 4db579ab73cd1bf0ca9624fc54b04f1104aac799 (diff) | |
| download | emacs-ebdf372b3b04440406cdd4b3fbc9a6c093b1a8b1.tar.gz emacs-ebdf372b3b04440406cdd4b3fbc9a6c093b1a8b1.zip | |
(rmail-summary-sort-by-keywords): New function.
| -rw-r--r-- | lisp/mail/rmailsum.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index b85486b620e..a4079f2f527 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -509,7 +509,8 @@ Commands for sorting the summary: | |||
| 509 | \\[rmail-summary-sort-by-author] Sort by author. | 509 | \\[rmail-summary-sort-by-author] Sort by author. |
| 510 | \\[rmail-summary-sort-by-recipient] Sort by recipient. | 510 | \\[rmail-summary-sort-by-recipient] Sort by recipient. |
| 511 | \\[rmail-summary-sort-by-correspondent] Sort by correspondent. | 511 | \\[rmail-summary-sort-by-correspondent] Sort by correspondent. |
| 512 | \\[rmail-summary-sort-by-lines] Sort by lines." | 512 | \\[rmail-summary-sort-by-lines] Sort by lines. |
| 513 | \\[rmail-summary-sort-by-keywords] Sort by keywords." | ||
| 513 | (interactive) | 514 | (interactive) |
| 514 | (kill-all-local-variables) | 515 | (kill-all-local-variables) |
| 515 | (setq major-mode 'rmail-summary-mode) | 516 | (setq major-mode 'rmail-summary-mode) |
| @@ -623,6 +624,8 @@ Commands for sorting the summary: | |||
| 623 | 'rmail-summary-sort-by-correspondent) | 624 | 'rmail-summary-sort-by-correspondent) |
| 624 | (define-key rmail-summary-mode-map "\C-c\C-s\C-l" | 625 | (define-key rmail-summary-mode-map "\C-c\C-s\C-l" |
| 625 | 'rmail-summary-sort-by-lines) | 626 | 'rmail-summary-sort-by-lines) |
| 627 | (define-key rmail-summary-mode-map "\C-c\C-s\C-k" | ||
| 628 | 'rmail-summary-sort-by-keywords) | ||
| 626 | ) | 629 | ) |
| 627 | 630 | ||
| 628 | ;;; Menu bar bindings. | 631 | ;;; Menu bar bindings. |
| @@ -1108,6 +1111,16 @@ If prefix argument REVERSE is non-nil, sort them in reverse order." | |||
| 1108 | (interactive "P") | 1111 | (interactive "P") |
| 1109 | (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) | 1112 | (rmail-sort-from-summary (function rmail-sort-by-lines) reverse)) |
| 1110 | 1113 | ||
| 1114 | (defun rmail-summary-sort-by-keywords (reverse labels) | ||
| 1115 | "Sort messages of current Rmail summary by keywords. | ||
| 1116 | If prefix argument REVERSE is non-nil, sort them in reverse order. | ||
| 1117 | KEYWORDS is a comma-separated list of labels." | ||
| 1118 | (interactive "P\nsSort by labels: ") | ||
| 1119 | (rmail-sort-from-summary | ||
| 1120 | (function (lambda (reverse) | ||
| 1121 | (rmail-sort-by-keywords reverse labels))) | ||
| 1122 | reverse)) | ||
| 1123 | |||
| 1111 | (defun rmail-sort-from-summary (sortfun reverse) | 1124 | (defun rmail-sort-from-summary (sortfun reverse) |
| 1112 | "Sort Rmail messages from Summary buffer and update it after sorting." | 1125 | "Sort Rmail messages from Summary buffer and update it after sorting." |
| 1113 | (require 'rmailsort) | 1126 | (require 'rmailsort) |