@item gcc-self
@cindex gcc-self
If @code{(gcc-self . t)} is present in the group parameter list, newly
-composed messages will be @code{Gcc}'d to the current group. If
+composed messages will be @code{gcc}d to the current group. If
@code{(gcc-self . none)} is present, no @code{Gcc:} header will be
-generated, if @code{(gcc-self . "string")} is present, this string will
-be inserted literally as a @code{gcc} header. This parameter takes
-precedence over any default @code{Gcc} rules as described later
-(@pxref{Archived Messages}), with the exception for messages to resend.
+generated, if @code{(gcc-self . "group")} is present, this string will
+be inserted literally as a @code{Gcc:} header. It should be a group
+name. The @code{gcc-self} value may also be a list of strings and
+@code{t}, e.g., @code{(gcc-self "group1" "group2" t)} means to
+@code{gcc} the newly composed message into the groups @code{"group1"}
+and @code{"group2"}, and into the current group. The @code{gcc-self}
+parameter takes precedence over any default @code{Gcc} rules as
+described later (@pxref{Archived Messages}), with the exception for
+messages to resend.
@strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
@code{nntp} groups (or the like) isn't valid. An @code{nntp} server
(var (or gnus-outgoing-message-group gnus-message-archive-group))
(gcc-self-val
(and group (not (gnus-virtual-group-p group))
- (gnus-group-find-parameter group 'gcc-self)))
+ (gnus-group-find-parameter group 'gcc-self t)))
+ (gcc-self-get (lambda (gcc-self-val group)
+ (if (stringp gcc-self-val)
+ (if (string-match " " gcc-self-val)
+ (concat "\"" gcc-self-val "\"")
+ gcc-self-val)
+ ;; In nndoc groups, we use the parent group name
+ ;; instead of the current group.
+ (let ((group (or (gnus-group-find-parameter
+ gnus-newsgroup-name 'parent-group)
+ group)))
+ (if (string-match " " group)
+ (concat "\"" group "\"")
+ group)))))
result
(groups
(cond
(if gcc-self-val
;; Use the `gcc-self' param value instead.
(progn
- (insert
- (if (stringp gcc-self-val)
- (if (string-match " " gcc-self-val)
- (concat "\"" gcc-self-val "\"")
- gcc-self-val)
- ;; In nndoc groups, we use the parent group name
- ;; instead of the current group.
- (let ((group (or (gnus-group-find-parameter
- gnus-newsgroup-name 'parent-group)
- group)))
- (if (string-match " " group)
- (concat "\"" group "\"")
- group))))
+ (insert (if (listp gcc-self-val)
+ (mapconcat (lambda (val)
+ (funcall gcc-self-get val group))
+ gcc-self-val ", ")
+ (funcall gcc-self-get gcc-self-val group)))
(if (not (eq gcc-self-val 'none))
(insert "\n")
(gnus-delete-line)))