summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorAndrew G Cohen <cohen@andy.bu.edu>2020-09-11 10:31:47 +0800
committerAndrew G Cohen <cohen@andy.bu.edu>2020-09-11 10:31:47 +0800
commit8cf274f9603a19d99e9caa4c5da37e8b91ae4a7c (patch)
tree634ee6bd15e94c7a7171876a5126b4183a955d79 /lisp/gnus
parentf7e35f8162d366e2a91dcd1f21b3d59abc6d10d1 (diff)
downloademacs-8cf274f9603a19d99e9caa4c5da37e8b91ae4a7c.tar.gz
emacs-8cf274f9603a19d99e9caa4c5da37e8b91ae4a7c.tar.bz2
emacs-8cf274f9603a19d99e9caa4c5da37e8b91ae4a7c.zip
Allow an info structure as argument for gnus-group-get-parameter
* lisp/gnus/gnus.el (gnus-group-get-parameter): Allow the group argument to be either a group name or a group info structure. This is then parallel to gnus-group-set-parameter.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/gnus.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 8cd35e3d7b7..cb534260a65 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -3628,11 +3628,12 @@ If you call this function inside a loop, consider using the faster
(defun gnus-group-get-parameter (group &optional symbol allow-list)
"Return the group parameters for GROUP.
-If SYMBOL, return the value of that symbol in the group parameters.
-If ALLOW-LIST, also allow list as a result.
-Most functions should use `gnus-group-find-parameter', which
-also examines the topic parameters."
- (let ((params (gnus-info-params (gnus-get-info group))))
+If SYMBOL, return the value of that symbol in the group
+parameters. If ALLOW-LIST, also allow list as a result. Most
+functions should use `gnus-group-find-parameter', which also
+examines the topic parameters. GROUP can also be an info structure."
+ (let ((params (gnus-info-params (if (listp group) group
+ (gnus-get-info group)))))
(if symbol
(gnus-group-parameter-value params symbol allow-list)
params)))