]> git.eshelyaron.com Git - emacs.git/commitdiff
; Set explicit hook depth for erc-once-with-server-event
authorF. Jason Park <jp@neverwas.me>
Thu, 25 Apr 2024 12:09:50 +0000 (05:09 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 6 May 2024 16:36:34 +0000 (18:36 +0200)
* 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.

(cherry picked from commit 068e44ed754344667cf42fe252ebb601d7a8db93)

lisp/erc/erc.el
test/lisp/erc/erc-scenarios-base-association-nick.el
test/lisp/erc/resources/erc-d/erc-d-tests.el

index 053d44d5362fb92554c2b19562c7da7c4d16179b..e37b28669a400cd66c50bf898e5728ba901d1671 100644 (file)
@@ -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)
index 57e8abda73cc87e66d2d5e4da485dacdd74b2e25..c4601f3771f0e4c86ce8101146759f80b79cb173 100644 (file)
 
 ;; 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)
index dda1b1ced84db66067e7c8ce44dcaa684f62611e..a6357c90f036101650c4bfe2a7baf496970ed3fe 100644 (file)
       (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)