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

(rmail-output-body-to-file): Avoid error if message has no subject.

Use and set rmail-default-body-file.
parent 966fbd00
...@@ -333,12 +333,18 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." ...@@ -333,12 +333,18 @@ The optional fourth argument FROM-GNUS is set when called from GNUS."
FILE-NAME defaults, interactively, from the Subject field of the message." FILE-NAME defaults, interactively, from the Subject field of the message."
(interactive (interactive
(let ((default-file (let ((default-file
(mail-fetch-field "Subject"))) (or (mail-fetch-field "Subject")
(list (read-file-name rmail-default-body-file)))
"Output message body to file: " (list (setq rmail-default-body-file
(file-name-directory default-file) (read-file-name
default-file "Output message body to file: "
nil default-file)))) (and default-file (file-name-directory default-file))
default-file
nil default-file)))))
(setq file-name
(expand-file-name file-name
(and rmail-default-body-file
(file-name-directory rmail-default-body-file))))
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(search-forward "\n\n") (search-forward "\n\n")
......
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