Mercurial > emacs
comparison lisp/mail/rmailsum.el @ 88299:b23f09e292b0
(rmail-summary-show-message): Reformat.
(rmail-summary-get-summary-line): Renamed from
`rmail-summary-get-summary'. Callers updated.
(rmail-summary-mode-map): Initialize at definition, Doc fix.
(rmail-summary-undelete-many): Simplify.
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Sun, 29 Jan 2006 17:57:56 +0000 |
parents | 64f03d0b622f |
children | f2334bdf1c2e |
comparison
equal
deleted
inserted
replaced
88298:5bba61276888 | 88299:b23f09e292b0 |
---|---|
70 | 70 |
71 (defvar rmail-summary-overlay nil | 71 (defvar rmail-summary-overlay nil |
72 "Private storage for an Rmail summary overlay cache") | 72 "Private storage for an Rmail summary overlay cache") |
73 (put 'rmail-summary-overlay 'permanent-local t) | 73 (put 'rmail-summary-overlay 'permanent-local t) |
74 | 74 |
75 (defvar rmail-summary-mode-map nil | 75 (defvar rmail-summary-mode-map |
76 "Storage for the Ramil summary mode keymap.") | 76 (let ((map (make-keymap))) |
77 (suppress-keymap map) | |
78 (define-key map [mouse-2] 'rmail-summary-mouse-goto-message) | |
79 (define-key map "a" 'rmail-summary-add-label) | |
80 (define-key map "b" 'rmail-summary-bury) | |
81 (define-key map "B" 'rmail-summary-browse-body) | |
82 (define-key map "c" 'rmail-summary-continue) | |
83 (define-key map "d" 'rmail-summary-delete-forward) | |
84 (define-key map "\C-d" 'rmail-summary-delete-backward) | |
85 (define-key map "e" 'rmail-summary-edit-current-message) | |
86 (define-key map "f" 'rmail-summary-forward) | |
87 (define-key map "g" 'rmail-summary-get-new-mail) | |
88 (define-key map "h" 'rmail-summary) | |
89 (define-key map "i" 'rmail-summary-input) | |
90 (define-key map "j" 'rmail-summary-goto-msg) | |
91 (define-key map "\C-m" 'rmail-summary-goto-msg) | |
92 (define-key map "k" 'rmail-summary-kill-label) | |
93 (define-key map "l" 'rmail-summary-by-labels) | |
94 (define-key map "\e\C-h" 'rmail-summary) | |
95 (define-key map "\e\C-l" 'rmail-summary-by-labels) | |
96 (define-key map "\e\C-r" 'rmail-summary-by-recipients) | |
97 (define-key map "\e\C-f" 'rmail-summary-by-senders) | |
98 (define-key map "\e\C-s" 'rmail-summary-by-regexp) | |
99 (define-key map "\e\C-t" 'rmail-summary-by-topic) | |
100 (define-key map "m" 'rmail-summary-mail) | |
101 (define-key map "\M-m" 'rmail-summary-retry-failure) | |
102 (define-key map "n" 'rmail-summary-next-msg) | |
103 (define-key map "\en" 'rmail-summary-next-all) | |
104 (define-key map "\e\C-n" 'rmail-summary-next-labeled-message) | |
105 (define-key map "o" 'rmail-summary-output) | |
106 (define-key map "\C-o" 'rmail-summary-output) | |
107 (define-key map "p" 'rmail-summary-previous-msg) | |
108 (define-key map "\ep" 'rmail-summary-previous-all) | |
109 (define-key map "\e\C-p" 'rmail-summary-previous-labeled-message) | |
110 (define-key map "q" 'rmail-summary-quit) | |
111 (define-key map "Q" 'rmail-summary-wipe) | |
112 (define-key map "r" 'rmail-summary-reply) | |
113 (define-key map "s" 'rmail-summary-expunge-and-save) | |
114 (define-key map "\es" 'rmail-summary-search) | |
115 (define-key map "t" 'rmail-summary-toggle-header) | |
116 (define-key map "u" 'rmail-summary-undelete) | |
117 (define-key map "\M-u" 'rmail-summary-undelete-many) | |
118 (define-key map "x" 'rmail-summary-expunge) | |
119 (define-key map "w" 'rmail-summary-output-body) | |
120 (define-key map "." 'rmail-summary-beginning-of-message) | |
121 (define-key map "/" 'rmail-summary-end-of-message) | |
122 (define-key map "<" 'rmail-summary-first-message) | |
123 (define-key map ">" 'rmail-summary-last-message) | |
124 (define-key map " " 'rmail-summary-scroll-msg-up) | |
125 (define-key map "\177" 'rmail-summary-scroll-msg-down) | |
126 (define-key map "?" 'describe-mode) | |
127 (define-key map "\C-c\C-n" 'rmail-summary-next-same-subject) | |
128 (define-key map "\C-c\C-p" 'rmail-summary-previous-same-subject) | |
129 (define-key map "\C-c\C-s\C-d" 'rmail-summary-sort-by-date) | |
130 (define-key map "\C-c\C-s\C-s" 'rmail-summary-sort-by-subject) | |
131 (define-key map "\C-c\C-s\C-a" 'rmail-summary-sort-by-author) | |
132 (define-key map "\C-c\C-s\C-r" 'rmail-summary-sort-by-recipient) | |
133 (define-key map "\C-c\C-s\C-c" 'rmail-summary-sort-by-correspondent) | |
134 (define-key map "\C-c\C-s\C-l" 'rmail-summary-sort-by-lines) | |
135 (define-key map "\C-c\C-s\C-k" 'rmail-summary-sort-by-labels) | |
136 (define-key map [menu-bar] (make-sparse-keymap)) | |
137 (define-key map [menu-bar classify] | |
138 (cons "Classify" (make-sparse-keymap "Classify"))) | |
139 (define-key map [menu-bar classify output-menu] | |
140 '("Output (Rmail Menu)..." . rmail-summary-output-menu)) | |
141 (define-key map [menu-bar classify input-menu] | |
142 '("Input Rmail File (menu)..." . rmail-input-menu)) | |
143 (define-key map [menu-bar classify input-menu] '(nil)) | |
144 (define-key map [menu-bar classify output-menu] '(nil)) | |
145 (define-key map [menu-bar classify output-body] | |
146 '("Output (body)..." . rmail-summary-output-body)) | |
147 (define-key map [menu-bar classify output-inbox] | |
148 '("Output (inbox)..." . rmail-summary-output)) | |
149 (define-key map [menu-bar classify output] | |
150 '("Output (Rmail)..." . rmail-summary-output)) | |
151 (define-key map [menu-bar classify kill-label] | |
152 '("Kill Label..." . rmail-summary-kill-label)) | |
153 (define-key map [menu-bar classify add-label] | |
154 '("Add Label..." . rmail-summary-add-label)) | |
155 (define-key map [menu-bar summary] | |
156 (cons "Summary" (make-sparse-keymap "Summary"))) | |
157 (define-key map [menu-bar summary senders] | |
158 '("By Senders..." . rmail-summary-by-senders)) | |
159 (define-key map [menu-bar summary labels] | |
160 '("By Labels..." . rmail-summary-by-labels)) | |
161 (define-key map [menu-bar summary recipients] | |
162 '("By Recipients..." . rmail-summary-by-recipients)) | |
163 (define-key map [menu-bar summary topic] | |
164 '("By Topic..." . rmail-summary-by-topic)) | |
165 (define-key map [menu-bar summary regexp] | |
166 '("By Regexp..." . rmail-summary-by-regexp)) | |
167 (define-key map [menu-bar summary all] | |
168 '("All" . rmail-summary)) | |
169 (define-key map [menu-bar mail] | |
170 (cons "Mail" (make-sparse-keymap "Mail"))) | |
171 (define-key map [menu-bar mail rmail-summary-get-new-mail] | |
172 '("Get New Mail" . rmail-summary-get-new-mail)) | |
173 (define-key map [menu-bar mail lambda] | |
174 '("----")) | |
175 (define-key map [menu-bar mail continue] | |
176 '("Continue" . rmail-summary-continue)) | |
177 (define-key map [menu-bar mail resend] | |
178 '("Re-send..." . rmail-summary-resend)) | |
179 (define-key map [menu-bar mail forward] | |
180 '("Forward" . rmail-summary-forward)) | |
181 (define-key map [menu-bar mail retry] | |
182 '("Retry" . rmail-summary-retry-failure)) | |
183 (define-key map [menu-bar mail reply] | |
184 '("Reply" . rmail-summary-reply)) | |
185 (define-key map [menu-bar mail mail] | |
186 '("Mail" . rmail-summary-mail)) | |
187 (define-key map [menu-bar delete] | |
188 (cons "Delete" (make-sparse-keymap "Delete"))) | |
189 (define-key map [menu-bar delete expunge/save] | |
190 '("Expunge/Save" . rmail-summary-expunge-and-save)) | |
191 (define-key map [menu-bar delete expunge] | |
192 '("Expunge" . rmail-summary-expunge)) | |
193 (define-key map [menu-bar delete undelete] | |
194 '("Undelete" . rmail-summary-undelete)) | |
195 (define-key map [menu-bar delete delete] | |
196 '("Delete" . rmail-summary-delete-forward)) | |
197 (define-key map [menu-bar move] | |
198 (cons "Move" (make-sparse-keymap "Move"))) | |
199 (define-key map [menu-bar move search-back] | |
200 '("Search Back..." . rmail-summary-search-backward)) | |
201 (define-key map [menu-bar move search] | |
202 '("Search..." . rmail-summary-search)) | |
203 (define-key map [menu-bar move previous] | |
204 '("Previous Nondeleted" . rmail-summary-previous-msg)) | |
205 (define-key map [menu-bar move next] | |
206 '("Next Nondeleted" . rmail-summary-next-msg)) | |
207 (define-key map [menu-bar move last] | |
208 '("Last" . rmail-summary-last-message)) | |
209 (define-key map [menu-bar move first] | |
210 '("First" . rmail-summary-first-message)) | |
211 (define-key map [menu-bar move previous] | |
212 '("Previous" . rmail-summary-previous-all)) | |
213 (define-key map [menu-bar move next] | |
214 '("Next" . rmail-summary-next-all)) | |
215 map) | |
216 "Keymap for `rmail-summary-mode'.") | |
77 | 217 |
78 ;; Entry points for making a summary buffer. | 218 ;; Entry points for making a summary buffer. |
79 | 219 |
80 ;; Regenerate the contents of the summary | 220 ;; Regenerate the contents of the summary |
81 ;; using the same selection criterion as last time. | 221 ;; using the same selection criterion as last time. |
203 | 343 |
204 ;;;; General making of a summary buffer. | 344 ;;;; General making of a summary buffer. |
205 | 345 |
206 (defvar rmail-summary-symbol-number 0) | 346 (defvar rmail-summary-symbol-number 0) |
207 | 347 |
208 ;;; mbox: ready | |
209 (defun rmail-new-summary (description redo-form function &rest args) | 348 (defun rmail-new-summary (description redo-form function &rest args) |
210 "Create a summary of selected messages. | 349 "Create a summary of selected messages. |
211 DESCRIPTION makes part of the mode line of the summary buffer. | 350 DESCRIPTION makes part of the mode line of the summary buffer. |
212 For each message, FUNCTION is applied to the message number and ARGS... | 351 For each message, FUNCTION is applied to the message number and ARGS... |
213 and if the result is non-nil, that message is included. | 352 and if the result is non-nil, that message is included. |
233 ;; argument (FUNCTION). | 372 ;; argument (FUNCTION). |
234 (while (>= rmail-total-messages msgnum) | 373 (while (>= rmail-total-messages msgnum) |
235 (if (or (null function) | 374 (if (or (null function) |
236 (apply function (cons msgnum args))) | 375 (apply function (cons msgnum args))) |
237 (setq summary-msgs | 376 (setq summary-msgs |
238 (cons (cons msgnum (rmail-summary-get-summary msgnum)) | 377 (cons (cons msgnum (rmail-summary-get-summary-line msgnum)) |
239 summary-msgs))) | 378 summary-msgs))) |
240 (setq msgnum (1+ msgnum))) | 379 (setq msgnum (1+ msgnum))) |
241 (setq summary-msgs (nreverse summary-msgs)) | 380 (setq summary-msgs (nreverse summary-msgs)) |
242 ;; Place the collected summaries into the summary buffer. | 381 ;; Place the collected summaries into the summary buffer. |
243 (setq rmail-summary-buffer nil) | 382 (setq rmail-summary-buffer nil) |
482 (rmail-undelete-previous-message)) | 621 (rmail-undelete-previous-message)) |
483 (when rmail-enable-mime | 622 (when rmail-enable-mime |
484 (pop-to-buffer rmail-view-buffer)) | 623 (pop-to-buffer rmail-view-buffer)) |
485 (pop-to-buffer rmail-summary-buffer))))) | 624 (pop-to-buffer rmail-summary-buffer))))) |
486 | 625 |
487 ;;; mbox: ready for testing | |
488 (defun rmail-summary-undelete-many (&optional n) | 626 (defun rmail-summary-undelete-many (&optional n) |
489 "Undelete all deleted msgs, optional prefix arg N means undelete N prev msgs." | 627 "Undelete all deleted msgs, optional prefix arg N means undelete N prev msgs." |
490 (interactive "P") | 628 (interactive "P") |
491 (save-excursion | 629 (with-current-buffer rmail-buffer |
492 (set-buffer rmail-buffer) | |
493 (let* ((init-msg (if n rmail-current-message rmail-total-messages)) | 630 (let* ((init-msg (if n rmail-current-message rmail-total-messages)) |
494 (rmail-current-message init-msg) | 631 (rmail-current-message init-msg) |
495 (n (or n rmail-total-messages)) | 632 (n (or n rmail-total-messages)) |
496 (msgs-undeled 0)) | 633 (msgs-undeled 0)) |
497 (while (and (> rmail-current-message 0) | 634 (while (and (> rmail-current-message 0) (< msgs-undeled n)) |
498 (< msgs-undeled n)) | 635 (when (rmail-message-deleted-p rmail-current-message) |
499 (if (rmail-message-deleted-p rmail-current-message) | 636 (rmail-set-attribute "deleted" nil) |
500 (progn (rmail-set-attribute "deleted" nil) | 637 (setq msgs-undeled (1+ msgs-undeled))) |
501 (setq msgs-undeled (1+ msgs-undeled)))) | |
502 (setq rmail-current-message (1- rmail-current-message))) | 638 (setq rmail-current-message (1- rmail-current-message))) |
503 (set-buffer rmail-summary-buffer) | 639 (with-current-buffer rmail-summary-buffer |
504 (setq rmail-current-message init-msg msgs-undeled 0) | 640 (setq rmail-current-message init-msg msgs-undeled 0) |
505 (while (and (> rmail-current-message 0) | 641 (while (and (> rmail-current-message 0) (< msgs-undeled n)) |
506 (< msgs-undeled n)) | 642 (when (rmail-summary-deleted-p rmail-current-message) |
507 (if (rmail-summary-deleted-p rmail-current-message) | 643 (rmail-summary-mark-undeleted rmail-current-message) |
508 (progn (rmail-summary-mark-undeleted rmail-current-message) | 644 (setq msgs-undeled (1+ msgs-undeled))) |
509 (setq msgs-undeled (1+ msgs-undeled)))) | 645 (setq rmail-current-message (1- rmail-current-message))))))) |
510 (setq rmail-current-message (1- rmail-current-message)))))) | |
511 | 646 |
512 ;; Rmail Summary mode is suitable only for specially formatted data. | 647 ;; Rmail Summary mode is suitable only for specially formatted data. |
513 (put 'rmail-summary-mode 'mode-class 'special) | 648 (put 'rmail-summary-mode 'mode-class 'special) |
514 | 649 |
515 (defun rmail-summary-mode () | 650 (defun rmail-summary-mode () |
648 (save-excursion | 783 (save-excursion |
649 (set-buffer rmail-buffer) | 784 (set-buffer rmail-buffer) |
650 (rmail-show-message msg-num t)))))) | 785 (rmail-show-message msg-num t)))))) |
651 (rmail-summary-update-highlight nil))))) | 786 (rmail-summary-update-highlight nil))))) |
652 | 787 |
653 (if rmail-summary-mode-map | |
654 nil | |
655 (setq rmail-summary-mode-map (make-keymap)) | |
656 (suppress-keymap rmail-summary-mode-map) | |
657 | |
658 (define-key rmail-summary-mode-map [mouse-2] 'rmail-summary-mouse-goto-message) | |
659 (define-key rmail-summary-mode-map "a" 'rmail-summary-add-label) | |
660 (define-key rmail-summary-mode-map "b" 'rmail-summary-bury) | |
661 (define-key rmail-summary-mode-map "B" 'rmail-summary-browse-body) | |
662 (define-key rmail-summary-mode-map "c" 'rmail-summary-continue) | |
663 (define-key rmail-summary-mode-map "d" 'rmail-summary-delete-forward) | |
664 (define-key rmail-summary-mode-map "\C-d" 'rmail-summary-delete-backward) | |
665 (define-key rmail-summary-mode-map "e" 'rmail-summary-edit-current-message) | |
666 (define-key rmail-summary-mode-map "f" 'rmail-summary-forward) | |
667 (define-key rmail-summary-mode-map "g" 'rmail-summary-get-new-mail) | |
668 (define-key rmail-summary-mode-map "h" 'rmail-summary) | |
669 (define-key rmail-summary-mode-map "i" 'rmail-summary-input) | |
670 (define-key rmail-summary-mode-map "j" 'rmail-summary-goto-msg) | |
671 (define-key rmail-summary-mode-map "\C-m" 'rmail-summary-goto-msg) | |
672 (define-key rmail-summary-mode-map "k" 'rmail-summary-kill-label) | |
673 (define-key rmail-summary-mode-map "l" 'rmail-summary-by-labels) | |
674 (define-key rmail-summary-mode-map "\e\C-h" 'rmail-summary) | |
675 (define-key rmail-summary-mode-map "\e\C-l" 'rmail-summary-by-labels) | |
676 (define-key rmail-summary-mode-map "\e\C-r" 'rmail-summary-by-recipients) | |
677 (define-key rmail-summary-mode-map "\e\C-f" 'rmail-summary-by-senders) | |
678 (define-key rmail-summary-mode-map "\e\C-s" 'rmail-summary-by-regexp) | |
679 (define-key rmail-summary-mode-map "\e\C-t" 'rmail-summary-by-topic) | |
680 (define-key rmail-summary-mode-map "m" 'rmail-summary-mail) | |
681 (define-key rmail-summary-mode-map "\M-m" 'rmail-summary-retry-failure) | |
682 (define-key rmail-summary-mode-map "n" 'rmail-summary-next-msg) | |
683 (define-key rmail-summary-mode-map "\en" 'rmail-summary-next-all) | |
684 (define-key rmail-summary-mode-map "\e\C-n" 'rmail-summary-next-labeled-message) | |
685 (define-key rmail-summary-mode-map "o" 'rmail-summary-output) | |
686 (define-key rmail-summary-mode-map "\C-o" 'rmail-summary-output) | |
687 (define-key rmail-summary-mode-map "p" 'rmail-summary-previous-msg) | |
688 (define-key rmail-summary-mode-map "\ep" 'rmail-summary-previous-all) | |
689 (define-key rmail-summary-mode-map "\e\C-p" 'rmail-summary-previous-labeled-message) | |
690 (define-key rmail-summary-mode-map "q" 'rmail-summary-quit) | |
691 (define-key rmail-summary-mode-map "Q" 'rmail-summary-wipe) | |
692 (define-key rmail-summary-mode-map "r" 'rmail-summary-reply) | |
693 (define-key rmail-summary-mode-map "s" 'rmail-summary-expunge-and-save) | |
694 (define-key rmail-summary-mode-map "\es" 'rmail-summary-search) | |
695 (define-key rmail-summary-mode-map "t" 'rmail-summary-toggle-header) | |
696 (define-key rmail-summary-mode-map "u" 'rmail-summary-undelete) | |
697 (define-key rmail-summary-mode-map "\M-u" 'rmail-summary-undelete-many) | |
698 (define-key rmail-summary-mode-map "x" 'rmail-summary-expunge) | |
699 (define-key rmail-summary-mode-map "w" 'rmail-summary-output-body) | |
700 (define-key rmail-summary-mode-map "." 'rmail-summary-beginning-of-message) | |
701 (define-key rmail-summary-mode-map "/" 'rmail-summary-end-of-message) | |
702 (define-key rmail-summary-mode-map "<" 'rmail-summary-first-message) | |
703 (define-key rmail-summary-mode-map ">" 'rmail-summary-last-message) | |
704 (define-key rmail-summary-mode-map " " 'rmail-summary-scroll-msg-up) | |
705 (define-key rmail-summary-mode-map "\177" 'rmail-summary-scroll-msg-down) | |
706 (define-key rmail-summary-mode-map "?" 'describe-mode) | |
707 (define-key rmail-summary-mode-map "\C-c\C-n" 'rmail-summary-next-same-subject) | |
708 (define-key rmail-summary-mode-map "\C-c\C-p" 'rmail-summary-previous-same-subject) | |
709 (define-key rmail-summary-mode-map "\C-c\C-s\C-d" | |
710 'rmail-summary-sort-by-date) | |
711 (define-key rmail-summary-mode-map "\C-c\C-s\C-s" | |
712 'rmail-summary-sort-by-subject) | |
713 (define-key rmail-summary-mode-map "\C-c\C-s\C-a" | |
714 'rmail-summary-sort-by-author) | |
715 (define-key rmail-summary-mode-map "\C-c\C-s\C-r" | |
716 'rmail-summary-sort-by-recipient) | |
717 (define-key rmail-summary-mode-map "\C-c\C-s\C-c" | |
718 'rmail-summary-sort-by-correspondent) | |
719 (define-key rmail-summary-mode-map "\C-c\C-s\C-l" | |
720 'rmail-summary-sort-by-lines) | |
721 (define-key rmail-summary-mode-map "\C-c\C-s\C-k" | |
722 'rmail-summary-sort-by-labels) | |
723 ) | |
724 | |
725 ;;; Menu bar bindings. | |
726 | |
727 (define-key rmail-summary-mode-map [menu-bar] (make-sparse-keymap)) | |
728 | |
729 (define-key rmail-summary-mode-map [menu-bar classify] | |
730 (cons "Classify" (make-sparse-keymap "Classify"))) | |
731 | |
732 (define-key rmail-summary-mode-map [menu-bar classify output-menu] | |
733 '("Output (Rmail Menu)..." . rmail-summary-output-menu)) | |
734 | |
735 (define-key rmail-summary-mode-map [menu-bar classify input-menu] | |
736 '("Input Rmail File (menu)..." . rmail-input-menu)) | |
737 | |
738 (define-key rmail-summary-mode-map [menu-bar classify input-menu] | |
739 '(nil)) | |
740 | |
741 (define-key rmail-summary-mode-map [menu-bar classify output-menu] | |
742 '(nil)) | |
743 | |
744 (define-key rmail-summary-mode-map [menu-bar classify output-body] | |
745 '("Output (body)..." . rmail-summary-output-body)) | |
746 | |
747 (define-key rmail-summary-mode-map [menu-bar classify output-inbox] | |
748 '("Output (inbox)..." . rmail-summary-output)) | |
749 | |
750 (define-key rmail-summary-mode-map [menu-bar classify output] | |
751 '("Output (Rmail)..." . rmail-summary-output)) | |
752 | |
753 (define-key rmail-summary-mode-map [menu-bar classify kill-label] | |
754 '("Kill Label..." . rmail-summary-kill-label)) | |
755 | |
756 (define-key rmail-summary-mode-map [menu-bar classify add-label] | |
757 '("Add Label..." . rmail-summary-add-label)) | |
758 | |
759 (define-key rmail-summary-mode-map [menu-bar summary] | |
760 (cons "Summary" (make-sparse-keymap "Summary"))) | |
761 | |
762 (define-key rmail-summary-mode-map [menu-bar summary senders] | |
763 '("By Senders..." . rmail-summary-by-senders)) | |
764 | |
765 (define-key rmail-summary-mode-map [menu-bar summary labels] | |
766 '("By Labels..." . rmail-summary-by-labels)) | |
767 | |
768 (define-key rmail-summary-mode-map [menu-bar summary recipients] | |
769 '("By Recipients..." . rmail-summary-by-recipients)) | |
770 | |
771 (define-key rmail-summary-mode-map [menu-bar summary topic] | |
772 '("By Topic..." . rmail-summary-by-topic)) | |
773 | |
774 (define-key rmail-summary-mode-map [menu-bar summary regexp] | |
775 '("By Regexp..." . rmail-summary-by-regexp)) | |
776 | |
777 (define-key rmail-summary-mode-map [menu-bar summary all] | |
778 '("All" . rmail-summary)) | |
779 | |
780 (define-key rmail-summary-mode-map [menu-bar mail] | |
781 (cons "Mail" (make-sparse-keymap "Mail"))) | |
782 | |
783 (define-key rmail-summary-mode-map [menu-bar mail rmail-summary-get-new-mail] | |
784 '("Get New Mail" . rmail-summary-get-new-mail)) | |
785 | |
786 (define-key rmail-summary-mode-map [menu-bar mail lambda] | |
787 '("----")) | |
788 | |
789 (define-key rmail-summary-mode-map [menu-bar mail continue] | |
790 '("Continue" . rmail-summary-continue)) | |
791 | |
792 (define-key rmail-summary-mode-map [menu-bar mail resend] | |
793 '("Re-send..." . rmail-summary-resend)) | |
794 | |
795 (define-key rmail-summary-mode-map [menu-bar mail forward] | |
796 '("Forward" . rmail-summary-forward)) | |
797 | |
798 (define-key rmail-summary-mode-map [menu-bar mail retry] | |
799 '("Retry" . rmail-summary-retry-failure)) | |
800 | |
801 (define-key rmail-summary-mode-map [menu-bar mail reply] | |
802 '("Reply" . rmail-summary-reply)) | |
803 | |
804 (define-key rmail-summary-mode-map [menu-bar mail mail] | |
805 '("Mail" . rmail-summary-mail)) | |
806 | |
807 (define-key rmail-summary-mode-map [menu-bar delete] | |
808 (cons "Delete" (make-sparse-keymap "Delete"))) | |
809 | |
810 (define-key rmail-summary-mode-map [menu-bar delete expunge/save] | |
811 '("Expunge/Save" . rmail-summary-expunge-and-save)) | |
812 | |
813 (define-key rmail-summary-mode-map [menu-bar delete expunge] | |
814 '("Expunge" . rmail-summary-expunge)) | |
815 | |
816 (define-key rmail-summary-mode-map [menu-bar delete undelete] | |
817 '("Undelete" . rmail-summary-undelete)) | |
818 | |
819 (define-key rmail-summary-mode-map [menu-bar delete delete] | |
820 '("Delete" . rmail-summary-delete-forward)) | |
821 | |
822 (define-key rmail-summary-mode-map [menu-bar move] | |
823 (cons "Move" (make-sparse-keymap "Move"))) | |
824 | |
825 (define-key rmail-summary-mode-map [menu-bar move search-back] | |
826 '("Search Back..." . rmail-summary-search-backward)) | |
827 | |
828 (define-key rmail-summary-mode-map [menu-bar move search] | |
829 '("Search..." . rmail-summary-search)) | |
830 | |
831 (define-key rmail-summary-mode-map [menu-bar move previous] | |
832 '("Previous Nondeleted" . rmail-summary-previous-msg)) | |
833 | |
834 (define-key rmail-summary-mode-map [menu-bar move next] | |
835 '("Next Nondeleted" . rmail-summary-next-msg)) | |
836 | |
837 (define-key rmail-summary-mode-map [menu-bar move last] | |
838 '("Last" . rmail-summary-last-message)) | |
839 | |
840 (define-key rmail-summary-mode-map [menu-bar move first] | |
841 '("First" . rmail-summary-first-message)) | |
842 | |
843 (define-key rmail-summary-mode-map [menu-bar move previous] | |
844 '("Previous" . rmail-summary-previous-all)) | |
845 | |
846 (define-key rmail-summary-mode-map [menu-bar move next] | |
847 '("Next" . rmail-summary-next-all)) | |
848 | |
849 (defun rmail-summary-mouse-goto-message (event) | 788 (defun rmail-summary-mouse-goto-message (event) |
850 "Select the message whose summary line you click on." | 789 "Select the message whose summary line you click on." |
851 (interactive "@e") | 790 (interactive "@e") |
852 (goto-char (posn-point (event-end event))) | 791 (goto-char (posn-point (event-end event))) |
853 (setq rmail-current-message (rmail-summary-get-message-at-point)) | 792 (setq rmail-current-message (rmail-summary-get-message-at-point)) |
1022 ;; If pop-to-buffer did not use that window, delete that | 961 ;; If pop-to-buffer did not use that window, delete that |
1023 ;; window. (This can happen if it uses another frame.) | 962 ;; window. (This can happen if it uses another frame.) |
1024 (or (eq buffer (window-buffer (next-window (frame-first-window)))) | 963 (or (eq buffer (window-buffer (next-window (frame-first-window)))) |
1025 (delete-other-windows))) | 964 (delete-other-windows))) |
1026 (pop-to-buffer rmail-view-buffer)) | 965 (pop-to-buffer rmail-view-buffer)) |
1027 (cond | 966 (cond ((eq where 'BEG) |
1028 ((eq where 'BEG) | 967 (goto-char (point-min)) |
1029 (goto-char (point-min)) | 968 (search-forward "\n\n")) |
1030 (search-forward "\n\n")) | 969 ((eq where 'END) |
1031 ((eq where 'END) | 970 (goto-char (point-max)) |
1032 (goto-char (point-max)) | 971 (recenter (1- (window-height))))) |
1033 (recenter (1- (window-height)))) | |
1034 ) | |
1035 (pop-to-buffer rmail-summary-buffer)) | 972 (pop-to-buffer rmail-summary-buffer)) |
1036 | 973 |
1037 (defun rmail-summary-bury () | 974 (defun rmail-summary-bury () |
1038 "Bury the Rmail buffer and the Rmail summary buffer." | 975 "Bury the Rmail buffer and the Rmail summary buffer." |
1039 (interactive) | 976 (interactive) |
1313 (set-buffer rmail-buffer))) | 1250 (set-buffer rmail-buffer))) |
1314 (call-interactively 'rmail-resend))) | 1251 (call-interactively 'rmail-resend))) |
1315 | 1252 |
1316 ;;;; Summary output commands. | 1253 ;;;; Summary output commands. |
1317 | 1254 |
1318 ;;; mbox: ready for testing | |
1319 (defun rmail-summary-output-to-rmail-file (&optional file-name n) | 1255 (defun rmail-summary-output-to-rmail-file (&optional file-name n) |
1320 "Append the current message to an Rmail file named FILE-NAME. | 1256 "Append the current message to an Rmail file named FILE-NAME. |
1321 If the file does not exist, ask if it should be created. | 1257 If the file does not exist, ask if it should be created. |
1322 If file is being visited, the message is appended to the Emacs | 1258 If file is being visited, the message is appended to the Emacs |
1323 buffer visiting that file. | 1259 buffer visiting that file. |
1511 (or (rmail-desc-get-attr-code rmail-desc-answered-index n) " ") | 1447 (or (rmail-desc-get-attr-code rmail-desc-answered-index n) " ") |
1512 (or (rmail-desc-get-attr-code rmail-desc-filed-index n) " ") | 1448 (or (rmail-desc-get-attr-code rmail-desc-filed-index n) " ") |
1513 (or (rmail-desc-get-attr-code rmail-desc-edited-index n) " ") | 1449 (or (rmail-desc-get-attr-code rmail-desc-edited-index n) " ") |
1514 (or (rmail-desc-get-attr-code rmail-desc-stored-index n) " "))) | 1450 (or (rmail-desc-get-attr-code rmail-desc-stored-index n) " "))) |
1515 | 1451 |
1516 (defun rmail-summary-get-summary (n) | 1452 (defun rmail-summary-get-summary-line (n) |
1517 "Return a summary line for message N." | 1453 "Return a summary line for message N." |
1518 (let (keywords str subj) | 1454 (let (keywords str subj) |
1519 (dolist (keyword (rmail-desc-get-keywords n)) | 1455 (dolist (keyword (rmail-desc-get-keywords n)) |
1520 (when (and (rmail-keyword-p keyword) | 1456 (when (and (rmail-keyword-p keyword) |
1521 (not (rmail-attribute-p keyword))) | 1457 (not (rmail-attribute-p keyword))) |
1539 (defun rmail-summary-update (n) | 1475 (defun rmail-summary-update (n) |
1540 "Rewrite the summary line for message N." | 1476 "Rewrite the summary line for message N." |
1541 (with-current-buffer rmail-buffer | 1477 (with-current-buffer rmail-buffer |
1542 ;; we need to do this in the rmail-buffer lest the keywords are | 1478 ;; we need to do this in the rmail-buffer lest the keywords are |
1543 ;; not recognized | 1479 ;; not recognized |
1544 (let ((summary (rmail-summary-get-summary n))) | 1480 (let ((summary (rmail-summary-get-summary-line n))) |
1545 (with-current-buffer rmail-summary-buffer | 1481 (with-current-buffer rmail-summary-buffer |
1546 (save-excursion | 1482 (save-excursion |
1547 (let ((buffer-read-only nil)) | 1483 (let ((buffer-read-only nil)) |
1548 (rmail-summary-goto-msg n) | 1484 (rmail-summary-goto-msg n) |
1549 ;; summary line includes newline at the end | 1485 ;; summary line includes newline at the end |