From: F. Jason Park Date: Fri, 3 May 2024 03:16:07 +0000 (-0700) Subject: Add format-catalog entry for unknown chan mode in ERC X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0255b0f27b50db3c90747636a7549cfbfc6a9faf;p=emacs.git Add format-catalog entry for unknown chan mode in ERC * lisp/erc/erc.el (erc--process-channel-modes): Use format spec catalog entry, and convert char to string. (erc-message-english-channel-mode-unknown): New variable. ;; * test/lisp/erc/erc-scenarios-base-renick.el ;; (erc-scenarios-base-renick-queries-solo): Adjust timeout. ;; * test/lisp/erc/erc-scenarios-ignore.el (erc-scenarios-ignore/basic): ;; Adjust timeouts. ;; * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood): ;; Adjust timeouts. ;; * test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld: ;; Adjust timeouts. ;; * test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld: ;; Adjust timeouts. ;; * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-basic): ;; Adjust timeouts. ;; * test/lisp/erc/resources/sasl/plain.eld: Adjust timeouts. ;; * test/lisp/erc/resources/sasl/external.eld: Adjust timeout. ;; * test/lisp/erc/resources/base/auth-source/foonet.eld: Adjust ;; timeout. (cherry picked from commit caddc4e727a46e6b6ec7146c9e1cdc7b954f5c16) --- diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index e37b28669a4..ce805fdab13 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -7473,7 +7473,7 @@ complement relevant letters in STRING." t)) ((not fallbackp) (erc-display-message nil '(notice error) (erc-server-buffer) - (format "Unknown channel mode: %S" c))))) + 'channel-mode-unknown ?c (string c))))) (setq erc-channel-modes (sort erc-channel-modes #'string<)) (setq erc--mode-line-mode-string (concat "+" (erc--channel-modes erc--mode-line-chanmodes-arg-len))) @@ -9404,6 +9404,7 @@ SOFTP, only do so when defined as a variable." (incorrect-args . "Incorrect arguments. Usage:\n%c %u\n%d") (cannot-find-file . "Cannot find file %f") (cannot-read-file . "Cannot read file %f") + (channel-mode-unknown . "Unknown channel mode: %c") (connect . "Connecting to %S:%p... ") (country . "%c") (country-unknown . "%d: No such domain") diff --git a/test/lisp/erc/erc-scenarios-base-renick.el b/test/lisp/erc/erc-scenarios-base-renick.el index 35f37a0159e..3001fde6da0 100644 --- a/test/lisp/erc/erc-scenarios-base-renick.el +++ b/test/lisp/erc/erc-scenarios-base-renick.el @@ -177,7 +177,7 @@ (ert-info ("Joined by bouncer to #foo, pal persent") (with-current-buffer (erc-d-t-wait-for 1 (get-buffer "#foo")) - (erc-d-t-search-for 1 "On Thursday") + (erc-d-t-search-for 5 "On Thursday") (erc-scenarios-common-say "hi"))) (erc-d-t-wait-for 10 "Query buffer appears with message from pal" diff --git a/test/lisp/erc/erc-scenarios-ignore.el b/test/lisp/erc/erc-scenarios-ignore.el index 1142bbef14d..55be613b51b 100644 --- a/test/lisp/erc/erc-scenarios-ignore.el +++ b/test/lisp/erc/erc-scenarios-ignore.el @@ -62,8 +62,8 @@ (funcall expect 10 "ignoring alice for 1m0s") (funcall expect 10 " alice: Signior Iachimo") (erc-scenarios-common-say "/ignore") - (funcall expect 10 "alice 59s") - (funcall expect 10 "mike 59m59s") + (funcall expect 20 '(: "alice 5" (any "0-9") "s")) + (funcall expect 10 '(: "mike 59m5" (any "0-9") "s")) (funcall expect -0.1 "") (funcall expect 10 " alice: The ground is bloody") (erc-scenarios-common-say "/unignore alice") diff --git a/test/lisp/erc/erc-scenarios-misc.el b/test/lisp/erc/erc-scenarios-misc.el index 2afa1ce67a4..4cb5e65b15a 100644 --- a/test/lisp/erc/erc-scenarios-misc.el +++ b/test/lisp/erc/erc-scenarios-misc.el @@ -49,7 +49,7 @@ (ert-info ("#chan@foonet exists") (with-current-buffer (erc-d-t-wait-for 5 (get-buffer "#chan/foonet")) - (erc-d-t-search-for 2 "") + (erc-d-t-search-for 10 "") (erc-d-t-absent-for 0.1 "") (erc-d-t-absent-for 0.1 "