Commit bb2c8678 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(rmail-output-to-rmail-file):

Clean up handling of relative file names in DEFAULT-FILE.
parent 17e7ef1b
...@@ -68,21 +68,24 @@ starting with the current one. Deleted messages are skipped and don't count." ...@@ -68,21 +68,24 @@ starting with the current one. Deleted messages are skipped and don't count."
(setq answer (eval (cdr (car tail))))) (setq answer (eval (cdr (car tail)))))
(setq tail (cdr tail)))) (setq tail (cdr tail))))
;; If not suggestions, use same file as last time. ;; If not suggestions, use same file as last time.
(or answer rmail-default-rmail-file)))) (expand-file-name (or answer rmail-default-rmail-file)))))
(list (setq rmail-default-rmail-file (let ((read-file
(let ((read-file (expand-file-name
(read-file-name (read-file-name
(concat "Output message to Rmail file: (default " (concat "Output message to Rmail file: (default "
(file-name-nondirectory default-file) (file-name-nondirectory default-file)
") ") ") ")
(file-name-directory default-file) (file-name-directory default-file)
default-file))) default-file)
(if (file-directory-p read-file) (file-name-directory default-file))))
(expand-file-name (file-name-nondirectory default-file) ;; If the user enters just a directory,
read-file) ;; use the name within that directory chosen by the default.
(expand-file-name (setq rmail-default-rmail-file
(or read-file default-file) (if (file-directory-p read-file)
(file-name-directory default-file))))) (expand-file-name (file-name-nondirectory default-file)
read-file)
read-file)))
(list rmail-default-rmail-file
(prefix-numeric-value current-prefix-arg)))) (prefix-numeric-value current-prefix-arg))))
(or count (setq count 1)) (or count (setq count 1))
(setq file-name (setq file-name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment