diff options
| -rw-r--r-- | lisp/mail/rmailout.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el index 29621cc955d..533283d8884 100644 --- a/lisp/mail/rmailout.el +++ b/lisp/mail/rmailout.el | |||
| @@ -319,4 +319,25 @@ The optional fourth argument FROM-GNUS is set when called from GNUS." | |||
| 319 | (setq count 0)))))) | 319 | (setq count 0)))))) |
| 320 | (kill-buffer tembuf)))) | 320 | (kill-buffer tembuf)))) |
| 321 | 321 | ||
| 322 | ;;;###autoload | ||
| 323 | (defun rmail-output-body (file-name) | ||
| 324 | "Write this message body to the file FILE-NAME. | ||
| 325 | FILE-NAME defaults, interactively, from the Subject field of the message." | ||
| 326 | (interactive | ||
| 327 | (let ((default-file | ||
| 328 | (mail-fetch-field "Subject"))) | ||
| 329 | (list (read-file-name | ||
| 330 | "Output message body to file: " | ||
| 331 | (file-name-directory default-file) | ||
| 332 | default-file | ||
| 333 | nil default-file)))) | ||
| 334 | (save-excursion | ||
| 335 | (goto-char (point-min)) | ||
| 336 | (search-forward "\n\n") | ||
| 337 | (write-region (point) (point-max) file-name) | ||
| 338 | (if (equal major-mode 'rmail-mode) | ||
| 339 | (rmail-set-attribute "stored" t))) | ||
| 340 | (if rmail-delete-after-output | ||
| 341 | (rmail-delete-forward))) | ||
| 342 | |||
| 322 | ;;; rmailout.el ends here | 343 | ;;; rmailout.el ends here |