From 03f844249cb15a8380d09041a537803c933a2769 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sat, 24 Jul 2021 17:11:21 +0200 Subject: [PATCH] Disable delay and ding in replace-tests * test/lisp/replace-tests.el (replace-tests-with-undo): When testing the "U" (undo all changes) option, the code will delay and ding which is obnoxious in an automated test. Disabling that makes the test quiet and about 150 times faster. --- test/lisp/replace-tests.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/lisp/replace-tests.el b/test/lisp/replace-tests.el index 6d004e657d0..417946c35fe 100644 --- a/test/lisp/replace-tests.el +++ b/test/lisp/replace-tests.el @@ -465,7 +465,12 @@ Return the last evalled form in BODY." ;; isearch-lazy-highlight-new-loop and sit-for (bug#36328) ((symbol-function 'replace-highlight) (lambda (&rest _args) - (string-match "[A-Z ]" "ForestGreen")))) + (string-match "[A-Z ]" "ForestGreen"))) + ;; Override `sit-for' and `ding' so that we don't have + ;; to wait and listen to bells when running the test. + ((symbol-function 'sit-for) + (lambda (&rest _args) (redisplay))) + ((symbol-function 'ding) 'ignore)) (perform-replace ,from ,to t replace-tests-perform-replace-regexp-flag nil)) ,@body)))) -- 2.39.2