aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorF. Jason Park2024-04-25 05:09:50 -0700
committerF. Jason Park2024-05-02 19:21:48 -0700
commit068e44ed754344667cf42fe252ebb601d7a8db93 (patch)
tree2766bab669944e4fa20533c2f96f3b9024f9fb2c
parenta156c98df0f24da365872678e20e84e1157d1225 (diff)
downloademacs-068e44ed754344667cf42fe252ebb601d7a8db93.tar.gz
emacs-068e44ed754344667cf42fe252ebb601d7a8db93.zip
; Set explicit hook depth for erc-once-with-server-event
* lisp/erc/erc.el (erc-once-with-server-event): Set hook depth to -95. * test/lisp/erc/erc-scenarios-base-association-nick.el: Improve comment. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d--render-entries): Remove do-nothing assertion since its purpose was unclear and likely dubious, as was incidentally highlighted by the addition of a function not present on older Emacsen, which this test still needs to run on.
-rw-r--r--lisp/erc/erc.el2
-rw-r--r--test/lisp/erc/erc-scenarios-base-association-nick.el24
-rw-r--r--test/lisp/erc/resources/erc-d/erc-d-tests.el3
3 files changed, 13 insertions, 16 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 053d44d5362..e37b28669a4 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1595,7 +1595,7 @@ capabilities."
1595 (remove-hook hook fun t)) 1595 (remove-hook hook fun t))
1596 (fmakunbound fun) 1596 (fmakunbound fun)
1597 (funcall f proc parsed))) 1597 (funcall f proc parsed)))
1598 (add-hook hook fun nil t) 1598 (add-hook hook fun -95 t)
1599 fun)) 1599 fun))
1600 1600
1601(defun erc--warn-once-before-connect (mode-var &rest args) 1601(defun erc--warn-once-before-connect (mode-var &rest args)
diff --git a/test/lisp/erc/erc-scenarios-base-association-nick.el b/test/lisp/erc/erc-scenarios-base-association-nick.el
index 57e8abda73c..c4601f3771f 100644
--- a/test/lisp/erc/erc-scenarios-base-association-nick.el
+++ b/test/lisp/erc/erc-scenarios-base-association-nick.el
@@ -28,22 +28,22 @@
28 28
29;; You register a new nick in a dedicated query buffer, disconnect, 29;; You register a new nick in a dedicated query buffer, disconnect,
30;; and log back in, but your nick is not granted (maybe you just 30;; and log back in, but your nick is not granted (maybe you just
31;; turned off SASL). In any case, ERC obtains a backtick'd version. 31;; turned off SASL). In any case, ERC obtains a backticked version.
32;; You open a query buffer for NickServ, and ERC gives you the 32;; You open a query buffer for NickServ, and ERC gives you the
33;; existing one. And after you identify, all buffers retain their 33;; existing one. And after you identify, all buffers retain their
34;; names, although your net ID has changed internally. 34;; names, although your net ID has changed internally.
35;; 35;;
36;; If ERC would've instead failed (or intentionally refused) to make 36;; If ERC had instead failed (or intentionally refused) to make the
37;; the association, you would've ended up with a new NickServ buffer 37;; association, you would find yourself with a new NickServ buffer
38;; named after the new net ID as a suffix (based on the backtick'd 38;; named with a suffix reflecting the new net ID (based on the
39;; nick), for example, NickServ@foonet/tester`. And the original 39;; backticked nick), for example, NickServ@foonet/tester`. And the
40;; (disconnected) NickServ buffer would've gotten suffixed with *its* 40;; original (disconnected) NickServ buffer would also receive a suffix
41;; net-ID as well, e.g., NickServ@foonet/tester. And after 41;; with *its* net-ID, e.g., NickServ@foonet/tester. Upon identifying
42;; identifying, you would've seen ERC merge the two as well as their 42;; yourself, you'd see ERC merge both buffers along with their server
43;; server buffers. While this alternate behavior may arguably be a 43;; buffers. While this alternate behavior might more accurately
44;; more honest reflection of reality, it's also quite inconvenient. 44;; reflect reality, it introduces significant inconvenience. For a
45;; For a clearer example, see the original version of this file 45;; clearer example, see the original version of this file introduced
46;; introduced by "Add user-oriented test scenarios for ERC". 46;; by "Add user-oriented test scenarios for ERC".
47 47
48(ert-deftest erc-scenarios-base-association-nick-bumped () 48(ert-deftest erc-scenarios-base-association-nick-bumped ()
49 :tags '(:expensive-test) 49 :tags '(:expensive-test)
diff --git a/test/lisp/erc/resources/erc-d/erc-d-tests.el b/test/lisp/erc/resources/erc-d/erc-d-tests.el
index dda1b1ced84..a6357c90f03 100644
--- a/test/lisp/erc/resources/erc-d/erc-d-tests.el
+++ b/test/lisp/erc/resources/erc-d/erc-d-tests.el
@@ -367,9 +367,6 @@
367 (should (equal (funcall it) "foo3foo"))) 367 (should (equal (funcall it) "foo3foo")))
368 368
369 (ert-info ("Exits clean") 369 (ert-info ("Exits clean")
370 (when (interpreted-function-p
371 (alist-get 'f (erc-d-dialog-vars dialog))) ; may be compiled
372 (should (aref (alist-get 'f (erc-d-dialog-vars dialog)) 2)))
373 (should-not (funcall it)) 370 (should-not (funcall it))
374 (should (equal (erc-d-dialog-vars dialog) 371 (should (equal (erc-d-dialog-vars dialog)
375 `((:a . 1) 372 `((:a . 1)