Fix minor defcustom issues in Gnus (Bug#66715)

* lisp/gnus/gnus-art.el (gnus-button-prefer-mid-or-mail): Allow
function and add :tag to const values.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bookmark-inline-details):
Fix docstring.
* lisp/gnus/gnus-sum.el (gnus-simplify-subject-fuzzy-regexp): Allow a
single regexp as value.
* lisp/gnus/message.el (message-indent-citation-function): Allow a
single function as value.
(message-mail-alias-type): Allow for a list of options as value.
(message-dont-reply-to-names): Allow a function as value.
* lisp/gnus/spam-report.el (spam-report-url-ping-function): Fix
default value for the function widget.
This commit is contained in:
Mauro Aranda 2023-10-23 18:04:25 -03:00 committed by Stefan Kangas
parent 3beb5f5e24
commit 297fe945c5
5 changed files with 19 additions and 13 deletions

View file

@ -1622,7 +1622,8 @@ predicate. See Info node `(gnus)Customizing Articles'."
"The protocol used for encrypt articles. "The protocol used for encrypt articles.
It is a string, such as \"PGP\". If nil, ask user." It is a string, such as \"PGP\". If nil, ask user."
:version "22.1" :version "22.1"
:type 'string :type '(choice (const :tag "Ask me" nil)
string)
:group 'mime-security) :group 'mime-security)
(defcustom gnus-use-idna t (defcustom gnus-use-idna t
@ -7553,10 +7554,11 @@ must return `mid', `mail', `invalid' or `ask'."
:version "22.1" :version "22.1"
:group 'gnus-article-buttons :group 'gnus-article-buttons
:type '(choice (function-item :tag "Heuristic function" :type '(choice (function-item :tag "Heuristic function"
gnus-button-mid-or-mail-heuristic) gnus-button-mid-or-mail-heuristic)
(const ask) (const :tag "Query me" ask)
(const mid) (const :tag "Assume it's a message ID" mid)
(const mail))) (const :tag "Assume it's a mail address" mail)
function))
(defcustom gnus-button-mid-or-mail-heuristic-alist (defcustom gnus-button-mid-or-mail-heuristic-alist
'((-10.0 . ".+\\$.+@") '((-10.0 . ".+\\$.+@")

View file

@ -112,7 +112,7 @@ You can toggle whether details are shown with \\<gnus-bookmark-bmenu-mode-map>\\
(defcustom gnus-bookmark-bookmark-inline-details '(author) (defcustom gnus-bookmark-bookmark-inline-details '(author)
"Details to be shown with `gnus-bookmark-bmenu-toggle-infos'. "Details to be shown with `gnus-bookmark-bmenu-toggle-infos'.
The default value is \(subject)." The default value is (author)."
:type '(list :tag "Gnus bookmark details" :type '(list :tag "Gnus bookmark details"
(set :inline t (set :inline t
(const :tag "Author" author) (const :tag "Author" author)

View file

@ -315,7 +315,8 @@ This can either be a regular expression or list of regular expressions
that will be removed from subject strings if fuzzy subject that will be removed from subject strings if fuzzy subject
simplification is selected." simplification is selected."
:group 'gnus-thread :group 'gnus-thread
:type '(repeat regexp)) :type '(choice regexp
(repeat regexp)))
(defcustom gnus-show-threads t (defcustom gnus-show-threads t
"If non-nil, display threads in summary mode." "If non-nil, display threads in summary mode."

View file

@ -1147,7 +1147,8 @@ Note that these functions use `mail-citation-hook' if that is non-nil."
This can also be a list of functions. Each function can find the This can also be a list of functions. Each function can find the
citation between (point) and (mark t). And each function should leave citation between (point) and (mark t). And each function should leave
point and mark around the citation text as modified." point and mark around the citation text as modified."
:type 'function :type '(choice function
(repeat function))
:link '(custom-manual "(message)Insertion Variables") :link '(custom-manual "(message)Insertion Variables")
:group 'message-insertion) :group 'message-insertion)
@ -1408,8 +1409,9 @@ This can also be a list of values."
:group 'message :group 'message
:link '(custom-manual "(message)Mail Aliases") :link '(custom-manual "(message)Mail Aliases")
:type '(choice (const :tag "Use Mailabbrev" abbrev) :type '(choice (const :tag "Use Mailabbrev" abbrev)
(const :tag "Use ecomplete" ecomplete) (const :tag "Use ecomplete" ecomplete)
(const :tag "No expansion" nil))) (set (const :tag "Use Mailabbrev" abbrev)
(const :tag "Use ecomplete" ecomplete))))
(defcustom message-self-insert-commands '(self-insert-command) (defcustom message-self-insert-commands '(self-insert-command)
"List of `self-insert-command's used to trigger ecomplete. "List of `self-insert-command's used to trigger ecomplete.
@ -1453,8 +1455,9 @@ If a function email is passed as the argument."
:group 'message :group 'message
:link '(custom-manual "(message)Wide Reply") :link '(custom-manual "(message)Wide Reply")
:type '(choice (const :tag "Yourself" nil) :type '(choice (const :tag "Yourself" nil)
regexp regexp
(repeat :tag "Regexp List" regexp))) (repeat :tag "Regexp List" regexp)
function))
(defsubst message-dont-reply-to-names () (defsubst message-dont-reply-to-names ()
(if (functionp message-dont-reply-to-names) (if (functionp message-dont-reply-to-names)

View file

@ -64,7 +64,7 @@ The function must accept the arguments `host' and `report'."
spam-report-url-ping-mm-url) spam-report-url-ping-mm-url)
(const :tag "Store request URLs in `spam-report-requests-file'" (const :tag "Store request URLs in `spam-report-requests-file'"
spam-report-url-to-file) spam-report-url-to-file)
(function :tag "User defined function" nil))) (function :tag "User defined function")))
(defcustom spam-report-requests-file (defcustom spam-report-requests-file
(nnheader-concat gnus-directory "spam/" "spam-report-requests.url") (nnheader-concat gnus-directory "spam/" "spam-report-requests.url")