From ff41be114a8b55e8602c3c33e96eeb5e9905b72e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 24 Jun 2026 09:29:08 -0400 Subject: chore(elisp): clear byte-compile warnings (mail, dashboard, eshell, erc) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add declare-function/defvar declarations for lazily-loaded package functions and variables so each module compiles cleanly standalone, reflow over-long docstrings, and swap the obsolete erc-server-buffer-p for its named replacement erc-server-or-unjoined-channel-buffer-p (obsolete since 30.1). No behavior change. Two erc setq targets (erc-unique-buffers, erc-generate-buffer-name-function) appear not to be real ERC variables — declared to silence the warning with a NOTE flagging that the intended buffer-naming may not be taking effect. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ --- tests/test-erc-config-connected-servers.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/test-erc-config-connected-servers.el b/tests/test-erc-config-connected-servers.el index 7d4540d68..394367c3e 100644 --- a/tests/test-erc-config-connected-servers.el +++ b/tests/test-erc-config-connected-servers.el @@ -5,8 +5,9 @@ ;; process. The original test compared a buffer's own erc-server-process to the ;; same buffer-local value inside `with-current-buffer', which is always true, so ;; it returned every ERC buffer (channels, queries, dead connections). These -;; tests stub `erc-buffer-list' and the two ERC predicates so the classification -;; is exercised without a real IRC connection. +;; tests stub `erc-buffer-list' and the two ERC predicates +;; (`erc-server-or-unjoined-channel-buffer-p' and `erc-server-process-alive') +;; so the classification is exercised without a real IRC connection. ;;; Code: @@ -25,7 +26,7 @@ returned; a channel buffer and a dead-connection server buffer are excluded." (unwind-protect (cl-letf (((symbol-function 'erc-buffer-list) (lambda (&rest _) (list b-server b-channel b-dead))) - ((symbol-function 'erc-server-buffer-p) + ((symbol-function 'erc-server-or-unjoined-channel-buffer-p) (lambda (&rest _) (memq (current-buffer) (list b-server b-dead)))) ((symbol-function 'erc-server-process-alive) (lambda (&rest _) (eq (current-buffer) b-server)))) @@ -39,7 +40,7 @@ returned; a channel buffer and a dead-connection server buffer are excluded." (unwind-protect (cl-letf (((symbol-function 'erc-buffer-list) (lambda (&rest _) (list b-channel))) - ((symbol-function 'erc-server-buffer-p) (lambda (&rest _) nil)) + ((symbol-function 'erc-server-or-unjoined-channel-buffer-p) (lambda (&rest _) nil)) ((symbol-function 'erc-server-process-alive) (lambda (&rest _) nil))) (should (null (cj/erc-connected-servers)))) (kill-buffer b-channel)))) -- cgit v1.2.3