Mercurial > emacs
comparison lisp/mail/rmailsum.el @ 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 | 1102eac526d8 |
children | 6728ad7f85e9 |
comparison
equal
deleted
inserted
replaced
6716:9ce2d1a2c155 | 6717:2121bf252398 |
---|---|
507 \\[rmail-summary-sort-by-date] Sort by date. | 507 \\[rmail-summary-sort-by-date] Sort by date. |
508 \\[rmail-summary-sort-by-subject] Sort by subject. | 508 \\[rmail-summary-sort-by-subject] Sort by subject. |
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) |
516 (setq mode-name "RMAIL Summary") | 517 (setq mode-name "RMAIL Summary") |
517 (use-local-map rmail-summary-mode-map) | 518 (use-local-map rmail-summary-mode-map) |
621 'rmail-summary-sort-by-recipient) | 622 'rmail-summary-sort-by-recipient) |
622 (define-key rmail-summary-mode-map "\C-c\C-s\C-c" | 623 (define-key rmail-summary-mode-map "\C-c\C-s\C-c" |
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. |
629 | 632 |
630 (define-key rmail-summary-mode-map [menu-bar] (make-sparse-keymap)) | 633 (define-key rmail-summary-mode-map [menu-bar] (make-sparse-keymap)) |
1106 "Sort messages of current Rmail summary by lines of the message. | 1109 "Sort messages of current Rmail summary by lines of the message. |
1107 If prefix argument REVERSE is non-nil, sort them in reverse order." | 1110 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) |
1114 (let ((selwin (selected-window))) | 1127 (let ((selwin (selected-window))) |
1115 (unwind-protect | 1128 (unwind-protect |