aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-09-19 05:03:02 +0000
committerRichard M. Stallman1994-09-19 05:03:02 +0000
commitaa138cb4197b06a94f26c01131dd2574347f37bc (patch)
tree83ae80878e94aa109e93fc7a39d8370a90bc7f9a
parent61029318d24c6102ac394e55f46f24d7bb378d6e (diff)
downloademacs-aa138cb4197b06a94f26c01131dd2574347f37bc.tar.gz
emacs-aa138cb4197b06a94f26c01131dd2574347f37bc.zip
(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.
-rw-r--r--lisp/mail/rmailsum.el28
1 files changed, 26 insertions, 2 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 46ea888fe06..cf9d6bbd200 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -674,6 +674,12 @@ Commands for sorting the summary:
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
@@ -1106,7 +1112,7 @@ see the documentation of `rmail-resend'."
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.
1111If the file does not exist, ask if it should be created. 1117If the file does not exist, ask if it should be created.
1112If file is being visited, the message is appended to the Emacs 1118If file is being visited, the message is appended to the Emacs
@@ -1115,7 +1121,9 @@ buffer visiting that file."
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
@@ -1141,6 +1149,22 @@ The variables `rmail-secondary-file-directory' and
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