From: Mattias EngdegÄrd Date: Sat, 24 Jul 2021 15:11:21 +0000 (+0200) Subject: Disable delay and ding in replace-tests X-Git-Tag: emacs-28.0.90~1709 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=03f844249cb15a8380d09041a537803c933a2769;p=emacs.git 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. --- 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))))