From b00f400d1d3f954e460ea979f07f38f6bb31630e Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Fri, 11 Oct 2024 18:12:16 -0700 Subject: [PATCH] ; Undo erroneous change in ERC's sample configuration * doc/misc/erc.texi (Sample Configuration): Remove `erc-modules' from the `:custom' section of the `use-package' declaration for feature `erc' because its presence there depends on `:defer' being non-nil, and this configuration is supposed to be `:defer' agnostic. This reverts part of 3f1ce47f "; Add face customization to ERC's sample config". * etc/ERC-NEWS: Mention `erc-modules' no longer being autoloaded. * lisp/erc/erc-match.el (erc-text-matched-hooks): Explain expected format of non-NUH matches. * test/lisp/erc/erc-match-tests.el (test/lisp/erc/erc-match-tests.el): Inhibit messages when running non-interactively. --- doc/misc/erc.texi | 11 +++++++---- etc/ERC-NEWS | 7 +++++++ lisp/erc/erc-match.el | 12 ++++++++---- test/lisp/erc/erc-match-tests.el | 3 ++- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi index 9368c9ce070..939d93d6aa8 100644 --- a/doc/misc/erc.texi +++ b/doc/misc/erc.texi @@ -1324,11 +1324,14 @@ settings (@pxref{Sample configuration via Customize}). ;;; My ERC configuration -*- lexical-binding: t -*- (use-package erc - :custom + :config ;; Prefer SASL to NickServ, colorize nicknames, and show side panels - ;; with joined channels and members. - (erc-modules (append '(sasl nicks bufbar nickbar scrolltobottom) - erc-modules)) + ;; with joined channels and members + (setopt erc-modules + (seq-union '(sasl nicks bufbar nickbar scrolltobottom) + erc-modules)) + + :custom ;; Protect me from accidentally sending excess lines. (erc-inhibit-multiline-input t) (erc-send-whitespace-lines t) diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS index ea65a170b38..39403c17486 100644 --- a/etc/ERC-NEWS +++ b/etc/ERC-NEWS @@ -26,6 +26,13 @@ In fast-moving channels and in queries with long-winded bots, the on account of a rather stingy buffering threshold of 512 characters. Now configurable, its default has been relaxed eightfold to 4096. +** Option 'erc-modules' no longer autoloaded. +This cornerstone of ERC's configuration system was autoloaded globally +in 5.6 to allow users the freedom of running 'customize-option' without +first having to load the package. Unfortunately, this also had the side +effect of arranging for ERC to load on startup whenever someone +customized the variable. + ** Stray key binding removed from 'erc-fill-wrap-mode-map'. The command 'erc-fill-wrap-cycle-visual-movement' was mistakenly given the key binding "C-c a" in an inadvertent holdover from development. It diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index e28e7122cce..6dc18bf250e 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -240,10 +240,14 @@ for beeping to work." (defcustom erc-text-matched-hook '(erc-log-matches) "Abnormal hook for visiting text matching a predefined \"type\". -ERC calls members with the arguments (MATCH-TYPE NUH MESSAGE), -where MATCH-TYPE is one of the symbols `current-nick', `keyword', -`pal', `dangerous-host', `fool', and NUH is an `erc-response' -sender, like bob!~bob@example.org." +ERC calls members with the arguments (MATCH-TYPE NUH MESSAGE), where +MATCH-TYPE is a symbol among `current-nick', `keyword', `pal', +`dangerous-host', and `fool'; and NUH is an `erc-response' sender, like +\"bob!~bob@example.org\" or an IRC command prefixed with the string +\"Server:\", as in \"Server:353\". MESSAGE is the current incarnation +of the just-inserted message minus a leading speaker, like \" \". +For traditional reasons, MESSAGE always includes a leading +`erc-notice-prefix' and a trailing newline." :options '(erc-log-matches erc-hide-fools erc-beep-on-match) :type 'hook) diff --git a/test/lisp/erc/erc-match-tests.el b/test/lisp/erc/erc-match-tests.el index d22a945724b..fb92a153c95 100644 --- a/test/lisp/erc/erc-match-tests.el +++ b/test/lisp/erc/erc-match-tests.el @@ -569,7 +569,8 @@ (defun erc-match-tests--log-matches () (let ((erc-log-matches-flag t) - (erc-timestamp-format "[@@TS@@]")) + (erc-timestamp-format "[@@TS@@]") + (inhibit-message noninteractive)) (erc-match-tests--hl-type-keyword) (with-current-buffer "*scratch*" (ert-simulate-keys "\t\r"