diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-01-01 08:31:33 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-01-01 08:31:33 +0000 |
commit | 5cb1595fb3d9ec9b63ef322d3750aba9320331f7 (patch) | |
tree | 62dac166f96b3c0c6c442a351574d45c67b6be44 /lisp/mail/rmailout.el | |
parent | 5625c2fc22b4fc88870291c1ecb2e4c58208a509 (diff) | |
download | emacs-5cb1595fb3d9ec9b63ef322d3750aba9320331f7.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.el | 23 |
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 |