aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-02-06 16:32:46 +0000
committerRichard M. Stallman1994-02-06 16:32:46 +0000
commit09da735badefcf81a7f57bdcec0ede0dec5db576 (patch)
tree7d4799fa3bb8288658bca2b9de2b60e8d7b6804d
parentfffc2367a5c1e2d9a1a170c3f99b65734584fbf6 (diff)
downloademacs-09da735badefcf81a7f57bdcec0ede0dec5db576.tar.gz
emacs-09da735badefcf81a7f57bdcec0ede0dec5db576.zip
(rmail-output): Handle rmail-output-file-alist.
-rw-r--r--lisp/mail/rmailout.el38
1 files changed, 27 insertions, 11 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 5b0a222f2bd..3ad51f0b289 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -189,17 +189,33 @@ to set the `filed' attribute, and not to display a message.
189 189
190The optional fourth argument FROM-GNUS is set when called from GNUS." 190The optional fourth argument FROM-GNUS is set when called from GNUS."
191 (interactive 191 (interactive
192 (list (setq rmail-default-file 192 (let ((default-file
193 (read-file-name 193 (let (answer tail)
194 (concat "Output message to Unix mail file" 194 (setq tail rmail-output-file-alist)
195 (if rmail-default-file 195 ;; Suggest a file based on a pattern match.
196 (concat " (default " 196 (while (and tail (not answer))
197 (file-name-nondirectory rmail-default-file) 197 (save-excursion
198 "): " ) 198 (goto-char (point-min))
199 ": ")) 199 (if (re-search-forward (car (car tail)) nil t)
200 (and rmail-default-file (file-name-directory rmail-default-file)) 200 (setq answer (eval (cdr (car tail)))))
201 rmail-default-file)) 201 (setq tail (cdr tail))))
202 (prefix-numeric-value current-prefix-arg))) 202 ;; If not suggestions, use same file as last time.
203 (or answer rmail-default-file))))
204 (list (setq rmail-default-file
205 (let ((read-file
206 (read-file-name
207 (concat "Output message to Unix mail file: (default "
208 (file-name-nondirectory default-file)
209 ") ")
210 (file-name-directory default-file)
211 default-file)))
212 (if (file-directory-p read-file)
213 (expand-file-name (file-name-nondirectory default-file)
214 read-file)
215 (expand-file-name
216 (or read-file default-file)
217 (file-name-directory default-file)))))
218 (prefix-numeric-value current-prefix-arg))))
203 (or count (setq count 1)) 219 (or count (setq count 1))
204 (setq file-name 220 (setq file-name
205 (expand-file-name file-name 221 (expand-file-name file-name