Function: message-cross-post-followup-to

message-cross-post-followup-to is an interactive and byte-compiled function defined in message.el.gz.

Signature

(message-cross-post-followup-to TARGET-GROUP)

Documentation

Crossposts message and set Followup-To to TARGET-GROUP.

With prefix-argument just set Follow-Up, don't cross-post.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/message.el.gz
(defun message-cross-post-followup-to (target-group)
  "Crossposts message and set Followup-To to TARGET-GROUP.
With prefix-argument just set Follow-Up, don't cross-post."
  (interactive
   (list				; Completion based on Gnus
    (replace-regexp-in-string
     "\\`.*:" ""
     (completing-read "Followup To: "
		      (if (boundp 'gnus-newsrc-alist)
			  gnus-newsrc-alist)
		      nil nil '("poster" . 0)
		      (if (boundp 'gnus-group-history)
			  'gnus-group-history))))
   message-mode)
  (when (fboundp 'gnus-group-real-name)
    (setq target-group (gnus-group-real-name target-group)))
  (cond ((not (or (null target-group) ; new subject not empty
		  (zerop (string-width target-group))
		  (string-match "^[ \t]*$" target-group)))
	 (save-excursion
	   (let* ((old-groups (message-fetch-field "Newsgroups"))
		  (in-old (string-match
			   (regexp-quote target-group)
			   (or old-groups ""))))
	     ;; check whether target exactly matches old Newsgroups
	     (cond ((not old-groups)
		    (error "No current newsgroup"))
		   ((or (not in-old)
			(not (string-match
			      (concat "^[ \t]*"
				      (regexp-quote target-group)
				      "[ \t]*$")
			      old-groups)))
		    ;; yes, Newsgroups line must change
		    (message-cross-post-followup-to-header target-group)
		    ;; insert note whether we do cross-post or followup-to
		    (funcall message-cross-post-note-function
			     target-group
			     (if (or (and message-cross-post-default
					  (not current-prefix-arg))
				     (and (not message-cross-post-default)
					  current-prefix-arg)) t)
			     in-old old-groups))))))))