aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail/rmailout.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-06-11 16:36:19 +0000
committerRichard M. Stallman <[email protected]>1993-06-11 16:36:19 +0000
commitb25b6c3402ba93ea12fc369585cf9f6de0e09d25 (patch)
tree7946323d127ac85827452f2b5ee862decebfe0d6 /lisp/mail/rmailout.el
parent6bfb79222859ab9f3e5f00dce03581465fbc60ec (diff)
(rmail-output-to-rmail-file): Use the smart default in the prompt.
Diffstat (limited to 'lisp/mail/rmailout.el')
-rw-r--r--lisp/mail/rmailout.el37
1 files changed, 20 insertions, 17 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 5bd3808fa4..49aa6c5cd2 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -40,23 +40,26 @@ If file is being visited, the message is appended to the Emacs
buffer visiting that file.
A prefix argument N says to output N consecutive messages
starting with the current one. Deleted messages are skipped and don't count."
- (interactive (list (read-file-name
- (concat "Output message to Rmail file: (default "
- (file-name-nondirectory rmail-last-rmail-file)
- ") ")
- (file-name-directory rmail-last-rmail-file)
- (let (answer tail)
- (setq tail rmail-output-file-alist)
- ;; Suggest a file based on a pattern match.
- (while (and tail (not answer))
- (save-excursion
- (goto-char (point-min))
- (if (re-search-forward (car (car tail)) nil t)
- (setq answer (cdr (car tail))))
- (setq tail (cdr tail))))
- ;; If not suggestions, use same file as last time.
- (or answer rmail-last-rmail-file)))
- (prefix-numeric-value current-prefix-arg)))
+ (interactive
+ (let ((default-file
+ (let (answer tail)
+ (setq tail rmail-output-file-alist)
+ ;; Suggest a file based on a pattern match.
+ (while (and tail (not answer))
+ (save-excursion
+ (goto-char (point-min))
+ (if (re-search-forward (car (car tail)) nil t)
+ (setq answer (cdr (car tail))))
+ (setq tail (cdr tail))))
+ ;; If not suggestions, use same file as last time.
+ (or answer rmail-last-rmail-file))))
+ (list (read-file-name
+ (concat "Output message to Rmail file: (default "
+ (file-name-nondirectory default-file)
+ ") ")
+ (file-name-directory rmail-last-rmail-file)
+ default-file)
+ (prefix-numeric-value current-prefix-arg))))
(or count (setq count 1))
(setq file-name
(expand-file-name file-name