Function: message-cross-post-insert-note
message-cross-post-insert-note is a byte-compiled function defined in
message.el.gz.
Signature
(message-cross-post-insert-note TARGET-GROUP CROSS-POST IN-OLD OLD-GROUPS)
Documentation
Insert a in message body note about a set Followup or Crosspost.
If there have been previous notes, delete them. TARGET-GROUP specifies the group to Followup-To. When CROSS-POST is t, insert note about crossposting. IN-OLD specifies whether TARGET-GROUP is a member of OLD-GROUPS. OLD-GROUPS lists the old-groups the posting would have been made to before the user asked for a Crosspost.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-cross-post-insert-note (target-group cross-post in-old
_old-groups)
"Insert a in message body note about a set Followup or Crosspost.
If there have been previous notes, delete them. TARGET-GROUP specifies the
group to Followup-To. When CROSS-POST is t, insert note about
crossposting. IN-OLD specifies whether TARGET-GROUP is a member of
OLD-GROUPS. OLD-GROUPS lists the old-groups the posting would have
been made to before the user asked for a Crosspost."
;; start scanning body for previous uses
(message-goto-signature)
(let ((head (re-search-backward
(concat "^" mail-header-separator)
nil t))) ; just search in body
(message-goto-signature)
(while (re-search-backward
(concat "^" (regexp-quote message-cross-post-note) ".*")
head t)
(delete-line))
(message-goto-signature)
(while (re-search-backward
(concat "^" (regexp-quote message-followup-to-note) ".*")
head t)
(delete-line))
;; insert new note
(if (message-goto-signature)
(re-search-backward message-signature-separator))
(if (or in-old
(not cross-post)
(string-match "^[ \t]*poster[ \t]*$" target-group))
(insert (concat message-followup-to-note target-group "\n"))
(insert (concat message-cross-post-note target-group "\n")))))