changeset 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 964b419c227a
children 8ee0129c7bb8
files lisp/mail/rmailsum.el
diffstat 1 files changed, 26 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Mon Sep 19 05:02:12 1994 +0000
+++ b/lisp/mail/rmailsum.el	Mon Sep 19 05:03:02 1994 +0000
@@ -674,6 +674,12 @@
 (define-key rmail-summary-mode-map [menu-bar classify input-menu]
   '("Input Rmail file (menu)..." . rmail-input-menu))
 
+(define-key rmail-summary-mode-map [menu-bar classify input-menu]
+  '(nil))
+
+(define-key rmail-summary-mode-map [menu-bar classify output-menu]
+  '(nil))
+
 (define-key rmail-summary-mode-map [menu-bar classify output-inbox]
   '("Output (inbox)..." . rmail-summary-output))
 
@@ -1106,7 +1112,7 @@
 
 ;; Summary output commands.
 
-(defun rmail-summary-output-to-rmail-file ()
+(defun rmail-summary-output-to-rmail-file (&optional file-name)
   "Append the current message to an Rmail file named FILE-NAME.
 If the file does not exist, ask if it should be created.
 If file is being visited, the message is appended to the Emacs
@@ -1115,7 +1121,9 @@
   (save-excursion
     (set-buffer rmail-buffer)
     (let ((rmail-delete-after-output nil))
-      (call-interactively 'rmail-output-to-rmail-file)))
+      (if file-name
+	  (rmail-output-to-rmail-file file-name)
+	(call-interactively 'rmail-output-to-rmail-file))))
   (if rmail-delete-after-output
       (rmail-summary-delete-forward nil)))
 
@@ -1141,6 +1149,22 @@
       (call-interactively 'rmail-output)))
   (if rmail-delete-after-output
       (rmail-summary-delete-forward nil)))
+
+(defun rmail-summary-construct-io-menu ()
+  (let ((files (rmail-find-all-files rmail-secondary-file-directory)))
+    (if (listp files)
+	(progn
+	  (define-key rmail-summary-mode-map [menu-bar classify input-menu]
+	    (cons "Input Rmail File" 
+		  (rmail-list-to-menu "Input Rmail File" 
+				      (cdr files) 
+				      'rmail-summary-input)))
+	  (define-key rmail-summary-mode-map [menu-bar classify output-menu]
+	    (cons "Output Rmail File" 
+		  (rmail-list-to-menu "Output Rmail File" 
+				      (cdr files) 
+				      'rmail-summary-output-to-rmail-file)))))))
+
 
 ;; Sorting messages in Rmail Summary buffer.