1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 10:50:49 -08:00

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.
This commit is contained in:
Andrew G Cohen 2020-09-11 10:31:47 +08:00
parent f7e35f8162
commit 8cf274f960

View file

@ -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) (defun gnus-group-get-parameter (group &optional symbol allow-list)
"Return the group parameters for GROUP. "Return the group parameters for GROUP.
If SYMBOL, return the value of that symbol in the group parameters. If SYMBOL, return the value of that symbol in the group
If ALLOW-LIST, also allow list as a result. parameters. If ALLOW-LIST, also allow list as a result. Most
Most functions should use `gnus-group-find-parameter', which functions should use `gnus-group-find-parameter', which also
also examines the topic parameters." examines the topic parameters. GROUP can also be an info structure."
(let ((params (gnus-info-params (gnus-get-info group)))) (let ((params (gnus-info-params (if (listp group) group
(gnus-get-info group)))))
(if symbol (if symbol
(gnus-group-parameter-value params symbol allow-list) (gnus-group-parameter-value params symbol allow-list)
params))) params)))