comparison lisp/mail/rmailsum.el @ 8911:3abf3f2ef6cf

(rmail-summary-construct-io-menu): New function. (rmail-new-summary): Call rmail-summary-construct-io-menu. (rmail-summary-mode-map): New menu items 'Input Rmail File' and 'Output Rmail File'. (rmail-summary-output-to-rmail-file): New arg 'file-name'. If it non-nil, call rmail-output-to-rmail-file.
author Richard M. Stallman <rms@gnu.org>
date Mon, 19 Sep 1994 05:03:02 +0000
parents b30c35c8e7ed
children 6616ea991c4a
comparison
equal deleted inserted replaced
8910:964b419c227a 8911:3abf3f2ef6cf
672 '("Output (Rmail Menu)..." . rmail-summary-output-menu)) 672 '("Output (Rmail Menu)..." . rmail-summary-output-menu))
673 673
674 (define-key rmail-summary-mode-map [menu-bar classify input-menu] 674 (define-key rmail-summary-mode-map [menu-bar classify input-menu]
675 '("Input Rmail file (menu)..." . rmail-input-menu)) 675 '("Input Rmail file (menu)..." . rmail-input-menu))
676 676
677 (define-key rmail-summary-mode-map [menu-bar classify input-menu]
678 '(nil))
679
680 (define-key rmail-summary-mode-map [menu-bar classify output-menu]
681 '(nil))
682
677 (define-key rmail-summary-mode-map [menu-bar classify output-inbox] 683 (define-key rmail-summary-mode-map [menu-bar classify output-inbox]
678 '("Output (inbox)..." . rmail-summary-output)) 684 '("Output (inbox)..." . rmail-summary-output))
679 685
680 (define-key rmail-summary-mode-map [menu-bar classify output] 686 (define-key rmail-summary-mode-map [menu-bar classify output]
681 '("Output (Rmail)..." . rmail-summary-output-to-rmail-file)) 687 '("Output (Rmail)..." . rmail-summary-output-to-rmail-file))
1104 (define-key (current-local-map) 1110 (define-key (current-local-map)
1105 "\C-c\C-c" 'rmail-summary-send-and-exit))) 1111 "\C-c\C-c" 'rmail-summary-send-and-exit)))
1106 1112
1107 ;; Summary output commands. 1113 ;; Summary output commands.
1108 1114
1109 (defun rmail-summary-output-to-rmail-file () 1115 (defun rmail-summary-output-to-rmail-file (&optional file-name)
1110 "Append the current message to an Rmail file named FILE-NAME. 1116 "Append the current message to an Rmail file named FILE-NAME.
1111 If the file does not exist, ask if it should be created. 1117 If the file does not exist, ask if it should be created.
1112 If file is being visited, the message is appended to the Emacs 1118 If file is being visited, the message is appended to the Emacs
1113 buffer visiting that file." 1119 buffer visiting that file."
1114 (interactive) 1120 (interactive)
1115 (save-excursion 1121 (save-excursion
1116 (set-buffer rmail-buffer) 1122 (set-buffer rmail-buffer)
1117 (let ((rmail-delete-after-output nil)) 1123 (let ((rmail-delete-after-output nil))
1118 (call-interactively 'rmail-output-to-rmail-file))) 1124 (if file-name
1125 (rmail-output-to-rmail-file file-name)
1126 (call-interactively 'rmail-output-to-rmail-file))))
1119 (if rmail-delete-after-output 1127 (if rmail-delete-after-output
1120 (rmail-summary-delete-forward nil))) 1128 (rmail-summary-delete-forward nil)))
1121 1129
1122 (defun rmail-summary-output-menu () 1130 (defun rmail-summary-output-menu ()
1123 "Output current message to another Rmail file, chosen with a menu. 1131 "Output current message to another Rmail file, chosen with a menu.
1139 (set-buffer rmail-buffer) 1147 (set-buffer rmail-buffer)
1140 (let ((rmail-delete-after-output nil)) 1148 (let ((rmail-delete-after-output nil))
1141 (call-interactively 'rmail-output))) 1149 (call-interactively 'rmail-output)))
1142 (if rmail-delete-after-output 1150 (if rmail-delete-after-output
1143 (rmail-summary-delete-forward nil))) 1151 (rmail-summary-delete-forward nil)))
1152
1153 (defun rmail-summary-construct-io-menu ()
1154 (let ((files (rmail-find-all-files rmail-secondary-file-directory)))
1155 (if (listp files)
1156 (progn
1157 (define-key rmail-summary-mode-map [menu-bar classify input-menu]
1158 (cons "Input Rmail File"
1159 (rmail-list-to-menu "Input Rmail File"
1160 (cdr files)
1161 'rmail-summary-input)))
1162 (define-key rmail-summary-mode-map [menu-bar classify output-menu]
1163 (cons "Output Rmail File"
1164 (rmail-list-to-menu "Output Rmail File"
1165 (cdr files)
1166 'rmail-summary-output-to-rmail-file)))))))
1167
1144 1168
1145 ;; Sorting messages in Rmail Summary buffer. 1169 ;; Sorting messages in Rmail Summary buffer.
1146 1170
1147 (defun rmail-summary-sort-by-date (reverse) 1171 (defun rmail-summary-sort-by-date (reverse)
1148 "Sort messages of current Rmail summary by date. 1172 "Sort messages of current Rmail summary by date.