emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 068e44ed754: ; Set explicit hook depth for erc-once-with-server-e


From: F. Jason Park
Subject: master 068e44ed754: ; Set explicit hook depth for erc-once-with-server-event
Date: Thu, 2 May 2024 22:27:19 -0400 (EDT)

branch: master
commit 068e44ed754344667cf42fe252ebb601d7a8db93
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>

    ; 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.
---
 lisp/erc/erc.el                                    |  2 +-
 .../erc/erc-scenarios-base-association-nick.el     | 24 +++++++++++-----------
 test/lisp/erc/resources/erc-d/erc-d-tests.el       |  3 ---
 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."
                   (remove-hook hook fun t))
                 (fmakunbound fun)
                 (funcall f proc parsed)))
-    (add-hook hook fun nil t)
+    (add-hook hook fun -95 t)
     fun))
 
 (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 @@
 
 ;; You register a new nick in a dedicated query buffer, disconnect,
 ;; and log back in, but your nick is not granted (maybe you just
-;; turned off SASL).  In any case, ERC obtains a backtick'd version.
+;; turned off SASL).  In any case, ERC obtains a backticked version.
 ;; You open a query buffer for NickServ, and ERC gives you the
 ;; existing one.  And after you identify, all buffers retain their
 ;; names, although your net ID has changed internally.
 ;;
-;; If ERC would've instead failed (or intentionally refused) to make
-;; the association, you would've ended up with a new NickServ buffer
-;; named after the new net ID as a suffix (based on the backtick'd
-;; nick), for example, NickServ@foonet/tester`.  And the original
-;; (disconnected) NickServ buffer would've gotten suffixed with *its*
-;; net-ID as well, e.g., NickServ@foonet/tester.  And after
-;; identifying, you would've seen ERC merge the two as well as their
-;; server buffers.  While this alternate behavior may arguably be a
-;; more honest reflection of reality, it's also quite inconvenient.
-;; For a clearer example, see the original version of this file
-;; introduced by "Add user-oriented test scenarios for ERC".
+;; If ERC had instead failed (or intentionally refused) to make the
+;; association, you would find yourself with a new NickServ buffer
+;; named with a suffix reflecting the new net ID (based on the
+;; backticked nick), for example, NickServ@foonet/tester`.  And the
+;; original (disconnected) NickServ buffer would also receive a suffix
+;; with *its* net-ID, e.g., NickServ@foonet/tester.  Upon identifying
+;; yourself, you'd see ERC merge both buffers along with their server
+;; buffers.  While this alternate behavior might more accurately
+;; reflect reality, it introduces significant inconvenience.  For a
+;; clearer example, see the original version of this file introduced
+;; by "Add user-oriented test scenarios for ERC".
 
 (ert-deftest erc-scenarios-base-association-nick-bumped ()
   :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 @@
       (should (equal (funcall it) "foo3foo")))
 
     (ert-info ("Exits clean")
-      (when (interpreted-function-p
-             (alist-get 'f (erc-d-dialog-vars dialog))) ; may be compiled
-        (should (aref (alist-get 'f (erc-d-dialog-vars dialog)) 2)))
       (should-not (funcall it))
       (should (equal (erc-d-dialog-vars dialog)
                      `((:a . 1)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]