summaryrefslogtreecommitdiff
path: root/lisp/mail/rmailout.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-01-01 08:31:33 +0000
committerRichard M. Stallman <rms@gnu.org>1994-01-01 08:31:33 +0000
commit5eba7b640236c92006a7fe3d71d5baaa459549e2 (patch)
tree23096bc0c0d62c2b5fa292995cf924c4cdb2b6d3 /lisp/mail/rmailout.el
parent5881bc33dba9eff6a71a05b4a7f0795731306fa9 (diff)
downloademacs-5eba7b640236c92006a7fe3d71d5baaa459549e2.tar.gz
(rmail-output-to-rmail-file): If just a dir is specified,
use default name in specified dir.
Diffstat (limited to 'lisp/mail/rmailout.el')
-rw-r--r--lisp/mail/rmailout.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 90aedd8f62a..fa7c921de65 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -61,16 +61,19 @@ starting with the current one. Deleted messages are skipped and don't count."
;; If not suggestions, use same file as last time.
(or answer rmail-last-rmail-file))))
(list (setq rmail-last-rmail-file
- (expand-file-name
- (or
- (read-file-name
- (concat "Output message to Rmail file: (default "
- (file-name-nondirectory default-file)
- ") ")
- (file-name-directory default-file)
- default-file)
- default-file)
- (file-name-directory default-file)))
+ (let ((read-file
+ (read-file-name
+ (concat "Output message to Rmail file: (default "
+ (file-name-nondirectory default-file)
+ ") ")
+ (file-name-directory default-file)
+ default-file)))
+ (if (file-directory-p read-file)
+ (expand-file-name (file-name-nondirectory default-file)
+ read-file)
+ (expand-file-name
+ (or read-file default-file)
+ (file-name-directory default-file)))))
(prefix-numeric-value current-prefix-arg))))
(or count (setq count 1))
(setq file-name