* bug#66520: 30.0.50; Small issues with defcustoms in ERC
@ 2023-10-13 13:33 Mauro Aranda
2023-10-13 13:37 ` Mauro Aranda
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2023-10-13 13:33 UTC (permalink / raw)
To: 66520
Looking for defcustom docstrings and :type inconsistencies, I found the
following in erc/:
The docstring of erc-fill-variable-maximum-indentation says its value
can be nil, but its :type is just integer.
The choices in erc-keep-place-indicator-style look like a copy-pasta
from erc-keep-place-indicator-buffer-type. The docstring matches what
the code checks, so I guess the choices are wrong.
Finally, erc-networks-alist says that MATCHER can be either a regexp or
a function. But neither erc-determine-network (obsoleted) nor
erc-networks--determine check to see if MATCHER is a function. So maybe
that isn't supported?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#66520: 30.0.50; Small issues with defcustoms in ERC
2023-10-13 13:33 bug#66520: 30.0.50; Small issues with defcustoms in ERC Mauro Aranda
@ 2023-10-13 13:37 ` Mauro Aranda
2023-10-13 15:04 ` J.P.
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2023-10-13 13:37 UTC (permalink / raw)
To: 66520
[-- Attachment #1: Type: text/plain, Size: 130 bytes --]
tags 66520 patch
quit
I attach a patch to fix these issues. Maybe I'm wrong about changing
the docstring in erc-networks-alist.
[-- Attachment #2: 0001-More-defcustom-fixes-in-ERC-Bug-66520.patch --]
[-- Type: text/x-patch, Size: 2627 bytes --]
From f64664a42016738c034c5dcbac62064aade4f3e8 Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda@gmail.com>
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#66520: 30.0.50; Small issues with defcustoms in ERC
2023-10-13 13:37 ` Mauro Aranda
@ 2023-10-13 15:04 ` J.P.
0 siblings, 0 replies; 3+ messages in thread
From: J.P. @ 2023-10-13 15:04 UTC (permalink / raw)
To: Mauro Aranda; +Cc: emacs-erc, 66520-done
Mauro Aranda <maurooaranda@gmail.com> writes:
> tags 66520 patch
> quit
>
>
> I attach a patch to fix these issues.
Appreciate the diligence!
> Maybe I'm wrong about changing the docstring in erc-networks-alist.
Nah, I couldn't find any sign of the function variant being considered
in the 18+ years since the file was first introduced to the old CVS
repo.
I've added this as
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=baf778c7
Thanks and closing.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-13 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-13 13:33 bug#66520: 30.0.50; Small issues with defcustoms in ERC Mauro Aranda
2023-10-13 13:37 ` Mauro Aranda
2023-10-13 15:04 ` J.P.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).