From ad823664b20c3c30d649bf1576ff1a0cd2855392 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Sat, 18 Jan 2025 11:12:50 -0800 Subject: [PATCH] ; Don't quote localp argument to define-erc-module * etc/ERC-NEWS: Rearrange some entries for 5.6.1. * lisp/erc/erc-fill.el (erc-fill-wrap-mode): * lisp/erc/erc-goodies.el (erc-keep-place-indicator-mode) (erc-command-indicator-mode): * lisp/erc/erc-nicks.el (erc-nicks-mode): * lisp/erc/erc-notify.el (erc-querypoll-mode): * lisp/erc/erc-sasl.el (erc-sasl-mode): * lisp/erc/erc-services.el (erc-services-regain-mode): Don't quote localp argument. * test/lisp/erc/erc-scenarios-misc.el (erc-nicks-track-faces/defer): Skip on Emacs 27 due to recent CI failures. * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood): Adjust timeout. (cherry picked from commit d6b210aa09d6a5464c91e71460d9852a4445d46e) --- etc/ERC-NEWS | 24 +++++++++++++----------- lisp/erc/erc-fill.el | 2 +- lisp/erc/erc-goodies.el | 4 ++-- lisp/erc/erc-nicks.el | 2 +- lisp/erc/erc-notify.el | 2 +- lisp/erc/erc-sasl.el | 2 +- lisp/erc/erc-services.el | 2 +- test/lisp/erc/erc-nicks-tests.el | 3 +++ test/lisp/erc/erc-scenarios-misc.el | 2 +- 9 files changed, 24 insertions(+), 19 deletions(-) diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS index d491c3e5132..dd960994b4f 100644 --- a/etc/ERC-NEWS +++ b/etc/ERC-NEWS @@ -14,12 +14,6 @@ GNU Emacs since Emacs version 22.1. * Changes in ERC 5.6.1 -** Reliable library access for ban lists. -Say goodbye to continually running "/BANLIST" for programmatic -purposes. Modules can instead use the function 'erc-sync-banlist' to -guarantee that the variable 'erc-channel-banlist' remains synced for -the remainder of an IRC session. - ** Option 'erc-truncate-padding-size' controls truncation frequency. In fast-moving channels and in queries with long-winded bots, the 'truncate' module has historically been asked to work overtime, mostly @@ -33,15 +27,15 @@ 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. +** New option determines 'keep-place-indicator's influence on 'truncate'. +Option 'erc-keep-place-indicator-truncation' manages the tension between +truncation and place keeping, prioritizing one or the other. + ** 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 has been removed. -** New option determines 'keep-place-indicator's influence on 'truncate'. -Option 'erc-keep-place-indicator-truncation' manages the tension between -truncation and place keeping, prioritizing one or the other. - ** Updated defaults for the 'track' module's face-list options. The default values of options 'erc-track-faces-priority-list' and 'erc-track-faces-normal-list' have both gained a face for buttonized @@ -49,7 +43,9 @@ speaker names, with the latter option also gaining 'erc-notice-face'. This was done to provide a more frequent and practical indication of channel activity in keeping with the module's original design. -** Command 'erc-track-clear' clears the mode-line activity indicator. +** Command 'erc-track-clear' resets the mode-line activity indicator. +Clear ERC's mode-line area with a single stroke, effectively marking all +ERC buffers as having been read. ** An arguably less distracting 'erc-nicks-track-faces' variant. Setting this option to t tells the 'track' module to have the mode-line @@ -78,6 +74,12 @@ the option. ** Changes in the library API. +*** Reliable library access for ban lists. +Say goodbye to continually running "/BANLIST" for programmatic +purposes. Modules can instead use the function 'erc-sync-banlist' to +guarantee that the variable 'erc-channel-banlist' remains synced for +the remainder of an IRC session. + *** Function 'erc-normalize-port' may return 0 instead of nil. When given a nonempty, non-numeric string, this function now returns 0. Moreover, ERC officially requests that users not use its output for diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el index 09647b08b56..6b7dcec5eda 100644 --- a/lisp/erc/erc-fill.el +++ b/lisp/erc/erc-fill.el @@ -567,7 +567,7 @@ via `erc-fill-wrap-mode-hook'." #'erc-fill--wrap-merged-button-p t) (remove-hook 'erc-stamp--insert-date-hook #'erc-fill--wrap-unmerge-on-date-stamp t)) - 'local) + localp) (defvar-local erc-fill--wrap-length-function nil "Function to determine length of overhanging characters. diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el index c89ed3dccc5..1dd2f2d881f 100644 --- a/lisp/erc/erc-goodies.el +++ b/lisp/erc/erc-goodies.el @@ -422,7 +422,7 @@ and `keep-place-indicator' in different buffers." (remove-hook 'erc-keep-place-mode-hook #'erc--keep-place-indicator-on-global-module t) (kill-local-variable 'erc--keep-place-indicator-overlay)) - 'local) + localp) (defun erc--keep-place-indicator-on-global-module () "Ensure `keep-place-indicator' survives toggling `erc-keep-place-mode'. @@ -594,7 +594,7 @@ reveal echoed command lines after they've been inserted." ((remove-hook 'erc--input-review-functions #'erc--command-indicator-permit-insertion t) (erc-command-indicator-toggle-hidden +1)) - 'local) + localp) (defun erc-command-indicator () "Return the command-indicator prompt as a string. diff --git a/lisp/erc/erc-nicks.el b/lisp/erc/erc-nicks.el index 30f9be1bda5..7dbf94a45be 100644 --- a/lisp/erc/erc-nicks.el +++ b/lisp/erc/erc-nicks.el @@ -607,7 +607,7 @@ Abandon search after examining LIMIT faces." nil) (unless erc-button--nick-popup-alist (kill-local-variable 'erc-button--nick-popup-alist))) - 'local) + localp) (defun erc-nicks-customize-face (nick) "Customize or create persistent face for NICK." diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el index 471baeadd80..c74c5635a12 100644 --- a/lisp/erc/erc-notify.el +++ b/lisp/erc/erc-notify.el @@ -335,7 +335,7 @@ target buffer." (erc-querypoll-mode -1))) (kill-local-variable 'erc--querypoll-ring) (kill-local-variable 'erc--querypoll-timer)) - 'local) + localp) (cl-defmethod erc--queries-current-p (&context (erc-querypoll-mode (eql t))) t) diff --git a/lisp/erc/erc-sasl.el b/lisp/erc/erc-sasl.el index b67c1762fe1..87ee7bb138d 100644 --- a/lisp/erc/erc-sasl.el +++ b/lisp/erc/erc-sasl.el @@ -337,7 +337,7 @@ This doesn't solicit or validate a suite of supported mechanisms." (setf (erc-sasl--state-client erc-sasl--state) client)))) ((kill-local-variable 'erc-sasl--state) (kill-local-variable 'erc-sasl--options)) - 'local) + localp) (define-erc-response-handler (AUTHENTICATE) "Begin or resume an SASL session." nil diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 99159875e2f..e861406b34c 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -611,7 +611,7 @@ somewhat experimental, is likely only useful in conjunction with SASL authentication rather than the traditional approach provided by the `services' module it shares a library with (see Info node `(erc) SASL' for more)." - nil nil 'local) + nil nil localp) (cl-defmethod erc--nickname-in-use-make-request ((want string) temp &context (erc-server-connected null) diff --git a/test/lisp/erc/erc-nicks-tests.el b/test/lisp/erc/erc-nicks-tests.el index a6d2f6034d4..1e57fb83672 100644 --- a/test/lisp/erc/erc-nicks-tests.el +++ b/test/lisp/erc/erc-nicks-tests.el @@ -681,6 +681,9 @@ (funcall assert-result '(7 . erc-notice-face))))) (ert-deftest erc-nicks-track-faces/defer () + (when (< emacs-major-version 28) + (ert-skip "Possible intermittent failures on 27")) + (should (eq erc-nicks-track-faces 'prioritize)) (let ((erc-nicks-track-faces 'defer)) (erc-nicks-tests--track-faces diff --git a/test/lisp/erc/erc-scenarios-misc.el b/test/lisp/erc/erc-scenarios-misc.el index b50b77aef0c..c4b9cf246c5 100644 --- a/test/lisp/erc/erc-scenarios-misc.el +++ b/test/lisp/erc/erc-scenarios-misc.el @@ -51,7 +51,7 @@ (with-current-buffer (erc-d-t-wait-for 5 (get-buffer "#chan/foonet")) (erc-d-t-search-for 10 "") (erc-d-t-absent-for 0.1 "