Subject: Re: bug#66520: 30.0.50; Small issues with defcustoms in ERC

From: Mauro Aranda <[email-masked]>
Date: Fri, 13 Oct 2023 10:37:44 -0300

tags 66520 patch
quit

I attach a patch to fix these issues.  Maybe I'm wrong about changing
the docstring in erc-networks-alist.

From f64664a42016738c034c5dcbac62064aade4f3e8 Mon Sep 17 00:00:00 2001
From: Mauro Aranda <[email-masked]>
Date: Fri, 13 Oct 2023 10:36:29 -0300
Subject: [PATCH] More defcustom fixes in ERC (Bug#66520)

* lisp/erc/erc-fill.el (erc-fill-variable-maximum-indentation): Change
:type to choice, to allow nil.
* lisp/erc/erc-goodies.el (erc-keep-place-indicator-style): Fix
copy-pasta.
* lisp/erc/erc-networks.el (erc-networks-alist): Don't advertise that
MATCHER can be a function, since it doesn't look like that is
supported.
---
 lisp/erc/erc-fill.el     | 3 ++-
 lisp/erc/erc-goodies.el  | 4 +++-
 lisp/erc/erc-networks.el | 5 ++---
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 0e6b5a3efb8..508795da7c1 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -110,7 +110,8 @@ erc-fill-static-center
 (defcustom erc-fill-variable-maximum-indentation 17
   "Don't indent a line after a long nick more than this many characters.
 Set to nil to disable."
-  :type 'integer)
+  :type '(choice (const :tag "Disable" nil)
+                 integer))
 
 (defcustom erc-fill-column 78
   "The column at which a filled paragraph is broken."
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index b77176d8ac7..3ff4c72db99 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -389,7 +389,9 @@ erc-keep-place-indicator-style
 appropriate line.  A value of t does both."
   :group 'erc
   :package-version '(ERC . "5.6") ; FIXME sync on release
-  :type '(choice (const t) (const server) (const target)))
+  :type '(choice (const :tag "Use arrow" arrow)
+                 (const :tag "Use face" face)
+                 (const :tag "Use both arrow and face" t)))
 
 (defcustom erc-keep-place-indicator-buffer-type t
   "ERC buffer type in which to display `keep-place-indicator'.
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el
index ba7990e87d6..d73d715db2c 100644
--- a/lisp/erc/erc-networks.el
+++ b/lisp/erc/erc-networks.el
@@ -756,9 +756,8 @@ erc-networks-alist
 Each network is a list (NET MATCHER) where
 NET is a symbol naming that IRC network and
 MATCHER is used to find a corresponding network to a server while
-  connected to it.  If it is regexp, it's used to match against
-  `erc-server-announced-name'.  It can also be a function (predicate).
-  Then it is executed with the server buffer as current buffer."
+connected to it.  If it is a regexp, it's used to match against
+`erc-server-announced-name'."
   :type '(repeat
 	  (list :tag "Network"
 		(symbol :tag "Network name")
-- 
2.34.1