aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail/rmailout.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-01-01 08:31:33 +0000
committerRichard M. Stallman <[email protected]>1994-01-01 08:31:33 +0000
commit5cb1595fb3d9ec9b63ef322d3750aba9320331f7 (patch)
tree62dac166f96b3c0c6c442a351574d45c67b6be44 /lisp/mail/rmailout.el
parent5625c2fc22b4fc88870291c1ecb2e4c58208a509 (diff)
(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 90aedd8f62..fa7c921de6 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