Subject: bug#66715: 30.0.50; Minor issues with Gnus defcustoms

From: Mauro Aranda <[email-masked]>
Date: Mon, 23 Oct 2023 18:05:06 -0300

tags 66715 patch
quit

Patch attached.

From 7b01f87255a4d16f2f95262cae598164eede769f Mon Sep 17 00:00:00 2001
From: Mauro Aranda <[email-masked]>
Date: Mon, 23 Oct 2023 18:04:25 -0300
Subject: [PATCH] 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.
---
 lisp/gnus/gnus-art.el      | 12 +++++++-----
 lisp/gnus/gnus-bookmark.el |  2 +-
 lisp/gnus/gnus-sum.el      |  3 ++-
 lisp/gnus/message.el       | 13 ++++++++-----
 lisp/gnus/spam-report.el   |  2 +-
 5 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 6f201f9c3df..bd9a49eb6a5 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1622,7 +1622,8 @@ gnus-article-encrypt-protocol
   "The protocol used for encrypt articles.
 It is a string, such as \"PGP\".  If nil, ask user."
   :version "22.1"
-  :type 'string
+  :type '(choice (const :tag "Ask me" nil)
+                 string)
   :group 'mime-security)
 
 (defcustom gnus-use-idna t
@@ -7560,10 +7561,11 @@ gnus-button-prefer-mid-or-mail
   :version "22.1"
   :group 'gnus-article-buttons
   :type '(choice (function-item :tag "Heuristic function"
-				gnus-button-mid-or-mail-heuristic)
-		 (const ask)
-		 (const mid)
-		 (const mail)))
+                                gnus-button-mid-or-mail-heuristic)
+                 (const :tag "Query me" ask)
+                 (const :tag "Assume it's a message ID" mid)
+                 (const :tag "Assume it's a mail address" mail)
+                 function))
 
 (defcustom gnus-button-mid-or-mail-heuristic-alist
   '((-10.0 . ".+\\$.+@")
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el
index 1a926619e14..ce8220f3a6e 100644
--- a/lisp/gnus/gnus-bookmark.el
+++ b/lisp/gnus/gnus-bookmark.el
@@ -112,7 +112,7 @@ gnus-bookmark-use-annotations
 
 (defcustom gnus-bookmark-bookmark-inline-details '(author)
   "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"
 	       (set :inline t
 		    (const :tag "Author" author)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index f576d4e6147..eee2714c63f 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -322,7 +322,8 @@ gnus-simplify-subject-fuzzy-regexp
 that will be removed from subject strings if fuzzy subject
 simplification is selected."
   :group 'gnus-thread
-  :type '(repeat regexp))
+  :type '(choice regexp
+                 (repeat regexp)))
 
 (defcustom gnus-show-threads t
   "If non-nil, display threads in summary mode."
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 0071c02c081..0f5d253bc96 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1145,7 +1145,8 @@ message-indent-citation-function
 This can also be a list of functions.  Each function can find the
 citation between (point) and (mark t).  And each function should leave
 point and mark around the citation text as modified."
-  :type 'function
+  :type '(choice function
+                 (repeat function))
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-insertion)
 
@@ -1406,8 +1407,9 @@ message-mail-alias-type
   :group 'message
   :link '(custom-manual "(message)Mail Aliases")
   :type '(choice (const :tag "Use Mailabbrev" abbrev)
-		 (const :tag "Use ecomplete" ecomplete)
-		 (const :tag "No expansion" nil)))
+                 (const :tag "Use ecomplete" ecomplete)
+                 (set (const :tag "Use Mailabbrev" abbrev)
+                      (const :tag "Use ecomplete" ecomplete))))
 
 (defcustom message-self-insert-commands '(self-insert-command)
   "List of `self-insert-command's used to trigger ecomplete.
@@ -1451,8 +1453,9 @@ message-dont-reply-to-names
   :group 'message
   :link '(custom-manual "(message)Wide Reply")
   :type '(choice (const :tag "Yourself" nil)
-		 regexp
-		 (repeat :tag "Regexp List" regexp)))
+                 regexp
+                 (repeat :tag "Regexp List" regexp)
+                 function))
 
 (defsubst message-dont-reply-to-names ()
   (if (functionp message-dont-reply-to-names)
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index 7e0392797f9..9f1ec7e3677 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -64,7 +64,7 @@ spam-report-url-ping-function
 		 spam-report-url-ping-mm-url)
 	  (const :tag "Store request URLs in `spam-report-requests-file'"
 		 spam-report-url-to-file)
-	  (function :tag "User defined function" nil)))
+	  (function :tag "User defined function")))
 
 (defcustom spam-report-requests-file
   (nnheader-concat gnus-directory "spam/" "spam-report-requests.url")
-- 
2.34.1