aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorTassilo Horn2014-07-31 13:11:41 +0000
committerKatsumi Yamaoka2014-07-31 13:11:41 +0000
commitdef546a8b82f60478c780bf3cbdbceedcf7a2ccd (patch)
treedf57cac397f55ed6ceaa4af2540e7f6985a074a8 /lisp
parent21a7129a0b8a5c2a38c0c1b3e02b0e3f813cfa7e (diff)
downloademacs-def546a8b82f60478c780bf3cbdbceedcf7a2ccd.tar.gz
emacs-def546a8b82f60478c780bf3cbdbceedcf7a2ccd.zip
[Gnus] Allow list-valued gcc-self group params
* lisp/gnus/gnus-msg.el (gnus-inews-insert-gcc): Allow `gcc-self' to be a list of groups and t. * doc/misc/gnus.texi (Group Parameters): Document that `gcc-self' may also be a list.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/gnus-msg.el33
1 files changed, 19 insertions, 14 deletions
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 469b9d2cf81..8b9842918da 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1726,7 +1726,20 @@ this is a reply."
1726 (var (or gnus-outgoing-message-group gnus-message-archive-group)) 1726 (var (or gnus-outgoing-message-group gnus-message-archive-group))
1727 (gcc-self-val 1727 (gcc-self-val
1728 (and group (not (gnus-virtual-group-p group)) 1728 (and group (not (gnus-virtual-group-p group))
1729 (gnus-group-find-parameter group 'gcc-self))) 1729 (gnus-group-find-parameter group 'gcc-self t)))
1730 (gcc-self-get (lambda (gcc-self-val group)
1731 (if (stringp gcc-self-val)
1732 (if (string-match " " gcc-self-val)
1733 (concat "\"" gcc-self-val "\"")
1734 gcc-self-val)
1735 ;; In nndoc groups, we use the parent group name
1736 ;; instead of the current group.
1737 (let ((group (or (gnus-group-find-parameter
1738 gnus-newsgroup-name 'parent-group)
1739 group)))
1740 (if (string-match " " group)
1741 (concat "\"" group "\"")
1742 group)))))
1730 result 1743 result
1731 (groups 1744 (groups
1732 (cond 1745 (cond
@@ -1777,19 +1790,11 @@ this is a reply."
1777 (if gcc-self-val 1790 (if gcc-self-val
1778 ;; Use the `gcc-self' param value instead. 1791 ;; Use the `gcc-self' param value instead.
1779 (progn 1792 (progn
1780 (insert 1793 (insert (if (listp gcc-self-val)
1781 (if (stringp gcc-self-val) 1794 (mapconcat (lambda (val)
1782 (if (string-match " " gcc-self-val) 1795 (funcall gcc-self-get val group))
1783 (concat "\"" gcc-self-val "\"") 1796 gcc-self-val ", ")
1784 gcc-self-val) 1797 (funcall gcc-self-get gcc-self-val group)))
1785 ;; In nndoc groups, we use the parent group name
1786 ;; instead of the current group.
1787 (let ((group (or (gnus-group-find-parameter
1788 gnus-newsgroup-name 'parent-group)
1789 group)))
1790 (if (string-match " " group)
1791 (concat "\"" group "\"")
1792 group))))
1793 (if (not (eq gcc-self-val 'none)) 1798 (if (not (eq gcc-self-val 'none))
1794 (insert "\n") 1799 (insert "\n")
1795 (gnus-delete-line))) 1800 (gnus-delete-line)))