Function: nnmh-save-mail

nnmh-save-mail is a byte-compiled function defined in nnmh.el.gz.

Signature

(nnmh-save-mail GROUP-ART &optional NOINSERT)

Documentation

Called narrowed to an article.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnmh.el.gz
(defun nnmh-save-mail (group-art &optional noinsert)
  "Called narrowed to an article."
  (unless noinsert
    (nnmail-insert-lines)
    (nnmail-insert-xref group-art))
  (run-hooks 'nnmail-prepare-save-mail-hook)
  (run-hooks 'nnmh-prepare-save-mail-hook)
  (goto-char (point-min))
  (while (looking-at "From ")
    (replace-match "X-From-Line: ")
    (forward-line 1))
  ;; We save the article in all the newsgroups it belongs in.
  (let ((ga group-art)
	first)
    (while ga
      (nnmh-possibly-create-directory (caar ga))
      (let ((file (concat (nnmail-group-pathname
			   (caar ga) nnmh-directory)
			  (int-to-string (cdar ga)))))
	(if first
	    ;; It was already saved, so we just make a hard link.
	    (funcall nnmail-crosspost-link-function first file t)
	  ;; Save the article.
	  (nnmail-write-region (point-min) (point-max) file nil nil)
	  (setq first file)))
      (setq ga (cdr ga))))
  group-art)