Function: nnmail-insert-xref

nnmail-insert-xref is a byte-compiled function defined in nnmail.el.gz.

Signature

(nnmail-insert-xref GROUP-ALIST)

Documentation

Insert an Xref line based on the (group . article) alist.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnmail.el.gz
(defun nnmail-insert-xref (group-alist)
  "Insert an Xref line based on the (group . article) alist."
  (save-excursion
    (goto-char (point-min))
    (unless (search-forward "\n\n" nil t)
      (goto-char (point-max))
      (insert "\n"))
    (forward-char -1)
    (when (re-search-backward "^Xref: " nil t)
      (delete-region (match-beginning 0)
		     (progn (forward-line 1) (point))))
    (insert (format "Xref: %s" (system-name)))
    (while group-alist
      (insert (if enable-multibyte-characters
		  (format " %s:%d" (caar group-alist) (cdar group-alist))
		(encode-coding-string
		 (format " %s:%d" (caar group-alist) (cdar group-alist))
		 'utf-8)))
      (setq group-alist (cdr group-alist)))
    (insert "\n")))