# HG changeset patch # User Richard M. Stallman # Date 900222972 0 # Node ID 1e47dd38609d507e2eaef3dbe4e5eaaf7f94cdd9 # Parent f0c8af6c2dfd4eea69810f368f10e9bdfa0e58ea (rmail-output-to-rmail-file): Clean up handling of relative file names in DEFAULT-FILE. diff -r f0c8af6c2dfd -r 1e47dd38609d lisp/mail/rmailout.el --- a/lisp/mail/rmailout.el Sun Jul 12 03:15:53 1998 +0000 +++ b/lisp/mail/rmailout.el Sun Jul 12 05:56:12 1998 +0000 @@ -68,21 +68,24 @@ (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