# HG changeset patch # User Richard M. Stallman # Date 859760552 0 # Node ID 958340c8db5ee835c454f3b7f505b57518d019a0 # Parent 9ef8bf76c3c2dd929ee8e1e617dbfbfe4919f405 (rmail-output-body): New command. diff -r 9ef8bf76c3c2 -r 958340c8db5e lisp/mail/rmailout.el --- a/lisp/mail/rmailout.el Sun Mar 30 21:50:02 1997 +0000 +++ b/lisp/mail/rmailout.el Sun Mar 30 22:22:32 1997 +0000 @@ -319,4 +319,25 @@ (setq count 0)))))) (kill-buffer tembuf)))) +;;;###autoload +(defun rmail-output-body (file-name) + "Write this message body to the file FILE-NAME. +FILE-NAME defaults, interactively, from the Subject field of the message." + (interactive + (let ((default-file + (mail-fetch-field "Subject"))) + (list (read-file-name + "Output message body to file: " + (file-name-directory default-file) + default-file + nil default-file)))) + (save-excursion + (goto-char (point-min)) + (search-forward "\n\n") + (write-region (point) (point-max) file-name) + (if (equal major-mode 'rmail-mode) + (rmail-set-attribute "stored" t))) + (if rmail-delete-after-output + (rmail-delete-forward))) + ;;; rmailout.el ends here