]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-summary-construct-io-menu): Use all of FILES.
authorRichard M. Stallman <rms@gnu.org>
Wed, 6 Sep 1995 15:16:39 +0000 (15:16 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 6 Sep 1995 15:16:39 +0000 (15:16 +0000)
Also disable the menu instead of not displaying it, if FILES is empty.

lisp/mail/rmailsum.el

index 469c65452f69d87634e85b95eaef95598728527e..57e837c72162a30264777a19741e26dccfb21d6a 100644 (file)
@@ -1325,18 +1325,22 @@ The variables `rmail-secondary-file-directory' and
 
 (defun rmail-summary-construct-io-menu ()
   (let ((files (rmail-find-all-files rmail-secondary-file-directory)))
-    (if (listp files)
+    (if 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) 
+                                     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)))))))
+                                     files
+                                     'rmail-summary-output-to-rmail-file))))
+      (define-key rmail-summary-mode-map [menu-bar classify input-menu]
+       '("Input Rmail File" . rmail-disable-menu))
+      (define-key rmail-summary-mode-map [menu-bar classify output-menu]
+       '("Output Rmail File" . rmail-disable-menu)))))
 
 \f
 ;; Sorting messages in Rmail Summary buffer.