diff options
| author | Richard M. Stallman | 1998-05-23 20:08:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-23 20:08:57 +0000 |
| commit | d1cad4080e1ea4e14052750e84bb6eec4625ba69 (patch) | |
| tree | e622a4f2934c6c2c823f55f096b77f23b24e5231 | |
| parent | 966fbd00425ef715d374d260d2b8a8eb57321ab3 (diff) | |
| download | emacs-d1cad4080e1ea4e14052750e84bb6eec4625ba69.tar.gz emacs-d1cad4080e1ea4e14052750e84bb6eec4625ba69.zip | |
(rmail-output-body-to-file): Avoid error if message has no subject.
Use and set rmail-default-body-file.
| -rw-r--r-- | lisp/mail/rmailout.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 1834ff5ae26..7a8bfcf393e 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el | |||
| @@ -333,12 +333,18 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." | |||
| 333 | FILE-NAME defaults, interactively, from the Subject field of the message." | 333 | FILE-NAME defaults, interactively, from the Subject field of the message." |
| 334 | (interactive | 334 | (interactive |
| 335 | (let ((default-file | 335 | (let ((default-file |
| 336 | (mail-fetch-field "Subject"))) | 336 | (or (mail-fetch-field "Subject") |
| 337 | (list (read-file-name | 337 | rmail-default-body-file))) |
| 338 | "Output message body to file: " | 338 | (list (setq rmail-default-body-file |
| 339 | (file-name-directory default-file) | 339 | (read-file-name |
| 340 | default-file | 340 | "Output message body to file: " |
| 341 | nil default-file)))) | 341 | (and default-file (file-name-directory default-file)) |
| 342 | default-file | ||
| 343 | nil default-file))))) | ||
| 344 | (setq file-name | ||
| 345 | (expand-file-name file-name | ||
| 346 | (and rmail-default-body-file | ||
| 347 | (file-name-directory rmail-default-body-file)))) | ||
| 342 | (save-excursion | 348 | (save-excursion |
| 343 | (goto-char (point-min)) | 349 | (goto-char (point-min)) |
| 344 | (search-forward "\n\n") | 350 | (search-forward "\n\n") |