aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-03-30 22:22:32 +0000
committerRichard M. Stallman1997-03-30 22:22:32 +0000
commitd607b17dbe34b7ca54c2af4e04d0e66345ba7dd3 (patch)
tree898679d506ae23d8668c6148cb2ba6f7cb354183
parent78d7cf68ffaf2bc5bfe665b6215d0c8894daddc4 (diff)
downloademacs-d607b17dbe34b7ca54c2af4e04d0e66345ba7dd3.tar.gz
emacs-d607b17dbe34b7ca54c2af4e04d0e66345ba7dd3.zip
(rmail-output-body): New command.
-rw-r--r--lisp/mail/rmailout.el21
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.
325FILE-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