emacs-diffs
[Top][All Lists]
Advanced

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

master 492fd05 1/2: Fix mistake in test for erc-ring-previous-command


From: Lars Ingebrigtsen
Subject: master 492fd05 1/2: Fix mistake in test for erc-ring-previous-command
Date: Thu, 16 Sep 2021 09:25:31 -0400 (EDT)

branch: master
commit 492fd05ac21f10efc82a93eed23bdd4532bbb0b1
Author: F. Jason Park <jp@neverwas.me>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix mistake in test for erc-ring-previous-command
    
    * test/lisp/erc/erc-tests.el (erc-ring-previous-command):
    The variable erc-send-completed-hook was previously set to nil
    permanently, which would affect other tests (bug#50005).
---
 test/lisp/erc/erc-tests.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index d133972..9efcf4a 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -61,13 +61,16 @@
   (with-current-buffer (get-buffer-create "*#fake*")
     (erc-mode)
     (insert "\n\n")
-    (setq erc-input-marker (make-marker) ; these are all local
-          erc-insert-marker (make-marker)
-          erc-send-completed-hook nil)
+    (should-not (local-variable-if-set-p 'erc-send-completed-hook))
+    (set (make-local-variable 'erc-send-completed-hook) nil) ; skip t (globals)
+    (setq erc-input-marker (make-marker)
+          erc-insert-marker (make-marker))
     (set-marker erc-insert-marker (point-max))
     (erc-display-prompt)
     (should (= (point) erc-input-marker))
-    (add-hook 'erc-pre-send-functions #'erc-add-to-input-ring nil t)
+    ;; Just in case erc-ring-mode is already on
+    (setq-local erc-pre-send-functions nil)
+    (add-hook 'erc-pre-send-functions #'erc-add-to-input-ring)
     ;;
     (cl-letf (((symbol-function 'erc-process-input-line)
                (lambda (&rest _)



reply via email to

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