comparison lisp/mail/rmailout.el @ 5802:3db75b13c7f5

(rmail-output): Handle rmail-output-file-alist.
author Richard M. Stallman <rms@gnu.org>
date Sun, 06 Feb 1994 16:32:46 +0000
parents ee1ed3d9e517
children 84ad3a2c5373
comparison
equal deleted inserted replaced
5801:af397aaa8e6b 5802:3db75b13c7f5
187 The optional third argument NOATTRIBUTE, if non-nil, says not 187 The optional third argument NOATTRIBUTE, if non-nil, says not
188 to set the `filed' attribute, and not to display a message. 188 to set the `filed' attribute, and not to display a message.
189 189
190 The optional fourth argument FROM-GNUS is set when called from GNUS." 190 The 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
206 (and rmail-default-file 222 (and rmail-default-file
207 (file-name-directory rmail-default-file)))) 223 (file-name-directory rmail-default-file))))