summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-07-12 05:56:12 +0000
committerRichard M. Stallman <rms@gnu.org>1998-07-12 05:56:12 +0000
commitbb2c867843d7fefe401416be48a456bee57ecc43 (patch)
tree531263fc65d916fbd23624aa81efdb61d65185de
parent17e7ef1b77113ac763bcbf2c6a9af5ef7c74e978 (diff)
downloademacs-bb2c867843d7fefe401416be48a456bee57ecc43.tar.gz
(rmail-output-to-rmail-file):
Clean up handling of relative file names in DEFAULT-FILE.
-rw-r--r--lisp/mail/rmailout.el33
1 files changed, 18 insertions, 15 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 1c4194cda83..8c05dd3fb5f 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -68,21 +68,24 @@ starting with the current one. Deleted messages are skipped and don't count."
(setq answer (eval (cdr (car tail)))))
(setq tail (cdr tail))))
;; If not suggestions, use same file as last time.
- (or answer rmail-default-rmail-file))))
- (list (setq rmail-default-rmail-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)))))
+ (expand-file-name (or answer rmail-default-rmail-file)))))
+ (let ((read-file
+ (expand-file-name
+ (read-file-name
+ (concat "Output message to Rmail file: (default "
+ (file-name-nondirectory default-file)
+ ") ")
+ (file-name-directory default-file)
+ default-file)
+ (file-name-directory default-file))))
+ ;; If the user enters just a directory,
+ ;; use the name within that directory chosen by the default.
+ (setq rmail-default-rmail-file
+ (if (file-directory-p read-file)
+ (expand-file-name (file-name-nondirectory default-file)
+ read-file)
+ read-file)))
+ (list rmail-default-rmail-file
(prefix-numeric-value current-prefix-arg))))
(or count (setq count 1))
(setq file-name