+(defun gnus-summary-resend-message-insert-gcc ()
+ "Insert Gcc header according to `gnus-gcc-self-resent-messages'."
+ (gnus-inews-insert-gcc)
+ (let ((gcc (mapcar
+ (lambda (group)
+ (mm-encode-coding-string
+ group
+ (gnus-group-name-charset (gnus-inews-group-method group)
+ group)))
+ (message-unquote-tokens
+ (message-tokenize-header (mail-fetch-field "gcc" nil t)
+ " ,")))))
+ (message-remove-header "gcc")
+ (when gcc
+ (goto-char (point-max))
+ (cond ((eq gnus-gcc-self-resent-messages 'none))
+ ((eq gnus-gcc-self-resent-messages t)
+ (insert "Gcc: \"" gnus-newsgroup-name "\"\n"))
+ ((stringp gnus-gcc-self-resent-messages)
+ (insert "Gcc: "
+ (mm-encode-coding-string
+ (if (string-match " " gnus-gcc-self-resent-messages)
+ (concat "\"" gnus-gcc-self-resent-messages "\"")
+ gnus-gcc-self-resent-messages)
+ (gnus-group-name-charset
+ (gnus-inews-group-method gnus-gcc-self-resent-messages)
+ gnus-gcc-self-resent-messages))
+ "\n"))
+ ((null gnus-gcc-self-resent-messages)
+ (insert "Gcc: " (mapconcat 'identity gcc ", ") "\n"))
+ ((eq gnus-gcc-self-resent-messages 'no-gcc-self)
+ (when (setq gcc (delete
+ gnus-newsgroup-name
+ (delete (concat "\"" gnus-newsgroup-name "\"")
+ gcc)))
+ (insert "Gcc: " (mapconcat 'identity gcc ", ") "\n")))))))
+