aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-03-18 07:09:57 +0000
committerRichard M. Stallman1994-03-18 07:09:57 +0000
commit90254bb0b7e0eeb84daadc1601bf598eacae2b81 (patch)
tree5950eb2deff2d1a326979ed610f4cc830cb6df10
parent254399e69ccd0a83d578c6d8abf838ba0ef9e3e1 (diff)
downloademacs-90254bb0b7e0eeb84daadc1601bf598eacae2b81.tar.gz
emacs-90254bb0b7e0eeb84daadc1601bf598eacae2b81.zip
(rmail-summary-window-size): New variable.
(rmail-maybe-display-summary): Use it. (rmail-secondary-file-directory): New var. (rmail-secondary-file-regexp): New var. (rmail-secondary-file-menu): New function. (rmail-input-menu): New command.
-rw-r--r--lisp/mail/rmail.el46
1 files changed, 42 insertions, 4 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 057ae8f9804..0b9b91bfc35 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -86,6 +86,13 @@ and the value of the environment variable MAIL overrides it).")
86(defvar rmail-retry-setup-hook nil 86(defvar rmail-retry-setup-hook nil
87 "Hook that `rmail-retry-failure' uses in place of `mail-setup-hook'.") 87 "Hook that `rmail-retry-failure' uses in place of `mail-setup-hook'.")
88 88
89;;;###autoload
90(defvar rmail-secondary-file-directory "~/"
91 "*Directory for additional secondary Rmail files.")
92;;;###autoload
93(defvar rmail-secondary-file-regexp "\\.xmail$"
94 "*Regexp for which files are secondary Rmail files.")
95
89;; These may be altered by site-init.el to match the format of mmdf files 96;; These may be altered by site-init.el to match the format of mmdf files
90;; delimiting used on a given host (delim1 and delim2 from the config 97;; delimiting used on a given host (delim1 and delim2 from the config
91;; files). 98;; files).
@@ -652,6 +659,21 @@ Instead, these commands are available:
652 (interactive "FRun rmail on RMAIL file: ") 659 (interactive "FRun rmail on RMAIL file: ")
653 (rmail filename)) 660 (rmail filename))
654 661
662;; Choose a .xmail file in dir rmail-secondary-file-directory.
663(defun rmail-secondary-file-menu (event)
664 (let* ((files (directory-files rmail-secondary-file-directory t
665 rmail-secondary-file-regexp))
666 (menu (list "Rmail Files"
667 (cons "Rmail Files"
668 (mapcar (function (lambda (f) (cons f f)))
669 files)))))
670 (x-popup-menu event menu)))
671
672(defun rmail-input-menu (event)
673 "Choose a new Rmail file to edit, with a menu."
674 (interactive "e")
675 (rmail-input (expand-file-name (rmail-secondary-file-menu event)
676 rmail-secondary-file-directory)))
655 677
656;;;; *** Rmail input *** 678;;;; *** Rmail input ***
657 679
@@ -2036,7 +2058,7 @@ the body of the original message."
2036 2058
2037(defun rmail-summary-exists () 2059(defun rmail-summary-exists ()
2038 "Non-nil iff in an RMAIL buffer and an associated summary buffer exists. 2060 "Non-nil iff in an RMAIL buffer and an associated summary buffer exists.
2039Non-nil value returned is the summary buffer." 2061In fact, the non-nil value returned is the summary buffer itself."
2040 (and rmail-summary-buffer (buffer-name rmail-summary-buffer) 2062 (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
2041 rmail-summary-buffer)) 2063 rmail-summary-buffer))
2042 2064
@@ -2048,11 +2070,27 @@ Non-nil value returned is the summary buffer."
2048 "*Non-nil means Rmail should show the summary when it changes. 2070 "*Non-nil means Rmail should show the summary when it changes.
2049This has an effect only if a summary buffer exists.") 2071This has an effect only if a summary buffer exists.")
2050 2072
2073(defvar rmail-summary-window-size nil
2074 "*Non-nil means specify the height for an Rmail summary window.")
2075
2051;; Put the summary buffer back on the screen, if user wants that. 2076;; Put the summary buffer back on the screen, if user wants that.
2052(defun rmail-maybe-display-summary () 2077(defun rmail-maybe-display-summary ()
2053 (and rmail-summary-buffer (buffer-name rmail-summary-buffer) 2078 (let ((selected (selected-window))
2054 rmail-redisplay-summary 2079 window)
2055 (display-buffer rmail-summary-buffer))) 2080 ;; If requested, make sure the summary is displayed.
2081 (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
2082 rmail-redisplay-summary
2083 (display-buffer rmail-summary-buffer))
2084 ;; If requested, set the height of the summary window.
2085 (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
2086 rmail-summary-window-size
2087 (setq window (get-buffer-window rmail-summary-buffer))
2088 (unwind-protect
2089 (progn
2090 (select-window window)
2091 (enlarge-window (- rmail-summary-window-size
2092 (window-height))))
2093 (select-window selected)))))
2056 2094
2057;;;; *** Rmail Specify Inbox Files *** 2095;;;; *** Rmail Specify Inbox Files ***
2058 2096