changeset 8635:a241401a67ff

(rmail-summary-output-menu): New command. (rmail-summary-mode-map): Add Output and Input with menu of files. (rmail-summary-rmail-update): Check whether rmail-buffer is dead.
author Richard M. Stallman <rms@gnu.org>
date Fri, 26 Aug 1994 06:55:43 +0000
parents 187df0aff719
children 015bd32cdb38
files lisp/mail/rmailsum.el
diffstat 1 files changed, 23 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Fri Aug 26 05:18:31 1994 +0000
+++ b/lisp/mail/rmailsum.el	Fri Aug 26 06:55:43 1994 +0000
@@ -592,9 +592,10 @@
 			(select-window window)
 			(rmail-show-message msg-num))
 		    (select-window owin))
-		(save-excursion
-		  (set-buffer rmail-buffer)
-		  (rmail-show-message msg-num)))))))))
+		(if (buffer-name rmail-buffer)
+		    (save-excursion
+		      (set-buffer rmail-buffer)
+		      (rmail-show-message msg-num))))))))))
 
 (defvar rmail-summary-mode-map nil)
 
@@ -667,6 +668,12 @@
 (define-key rmail-summary-mode-map [menu-bar classify]
   (cons "Classify" (make-sparse-keymap "Classify")))
 
+(define-key rmail-summary-mode-map [menu-bar classify output-menu]
+  '("Output (Rmail Menu)..." . rmail-summary-output-menu))
+
+(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 output-inbox]
   '("Output (inbox)..." . rmail-summary-output))
 
@@ -1109,6 +1116,19 @@
   (if rmail-delete-after-output
       (rmail-summary-delete-forward nil)))
 
+(defun rmail-summary-output-menu ()
+  "Output current message to another Rmail file, chosen with a menu.
+Also set the default for subsequent \\[rmail-output-to-rmail-file] commands.
+The variables `rmail-secondary-file-directory' and
+`rmail-secondary-file-regexp' control which files are offered in the menu."
+  (interactive)
+  (save-excursion
+    (set-buffer rmail-buffer)
+    (let ((rmail-delete-after-output nil))
+      (call-interactively 'rmail-output-menu)))
+  (if rmail-delete-after-output
+      (rmail-summary-delete-forward nil)))
+
 (defun rmail-summary-output ()
   "Append this message to Unix mail file named FILE-NAME."
   (interactive)