diff options
| author | Richard M. Stallman | 1998-07-12 05:56:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-07-12 05:56:12 +0000 |
| commit | bb2c867843d7fefe401416be48a456bee57ecc43 (patch) | |
| tree | 531263fc65d916fbd23624aa81efdb61d65185de /lisp/mail | |
| parent | 17e7ef1b77113ac763bcbf2c6a9af5ef7c74e978 (diff) | |
| download | emacs-bb2c867843d7fefe401416be48a456bee57ecc43.tar.gz emacs-bb2c867843d7fefe401416be48a456bee57ecc43.zip | |
(rmail-output-to-rmail-file):
Clean up handling of relative file names in DEFAULT-FILE.
Diffstat (limited to 'lisp/mail')
| -rw-r--r-- | lisp/mail/rmailout.el | 33 |
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." | |||
| 68 | (setq answer (eval (cdr (car tail))))) | 68 | (setq answer (eval (cdr (car tail))))) |
| 69 | (setq tail (cdr tail)))) | 69 | (setq tail (cdr tail)))) |
| 70 | ;; If not suggestions, use same file as last time. | 70 | ;; If not suggestions, use same file as last time. |
| 71 | (or answer rmail-default-rmail-file)))) | 71 | (expand-file-name (or answer rmail-default-rmail-file))))) |
| 72 | (list (setq rmail-default-rmail-file | 72 | (let ((read-file |
| 73 | (let ((read-file | 73 | (expand-file-name |
| 74 | (read-file-name | 74 | (read-file-name |
| 75 | (concat "Output message to Rmail file: (default " | 75 | (concat "Output message to Rmail file: (default " |
| 76 | (file-name-nondirectory default-file) | 76 | (file-name-nondirectory default-file) |
| 77 | ") ") | 77 | ") ") |
| 78 | (file-name-directory default-file) | 78 | (file-name-directory default-file) |
| 79 | default-file))) | 79 | default-file) |
| 80 | (if (file-directory-p read-file) | 80 | (file-name-directory default-file)))) |
| 81 | (expand-file-name (file-name-nondirectory default-file) | 81 | ;; If the user enters just a directory, |
| 82 | read-file) | 82 | ;; use the name within that directory chosen by the default. |
| 83 | (expand-file-name | 83 | (setq rmail-default-rmail-file |
| 84 | (or read-file default-file) | 84 | (if (file-directory-p read-file) |
| 85 | (file-name-directory default-file))))) | 85 | (expand-file-name (file-name-nondirectory default-file) |
| 86 | read-file) | ||
| 87 | read-file))) | ||
| 88 | (list rmail-default-rmail-file | ||
| 86 | (prefix-numeric-value current-prefix-arg)))) | 89 | (prefix-numeric-value current-prefix-arg)))) |
| 87 | (or count (setq count 1)) | 90 | (or count (setq count 1)) |
| 88 | (setq file-name | 91 | (setq file-name |