From c09915c47300eeb436fca8f33c6328d0bd536cdb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Fri, 7 Feb 2025 11:27:06 +0100 Subject: [PATCH] ; Fix files-tests * test/lisp/files-tests.el (files-tests--with-buffer-offer-save): Override symbol function of read-key instead of read-event. (cherry picked from commit 92aecdfd9fda59f3ea66c5709f0bc7af882a0c0d) --- test/lisp/files-tests.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index e085d052e1c..5e2c4eb2669 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1973,7 +1973,7 @@ FN-TEST is the function to test: either `save-some-buffers' or `save-some-buffers-default-predicate' let-bound to a value specified inside ARGS-RESULTS. -During the call to FN-TEST,`read-event' is overridden with a function that +During the call to FN-TEST,`read-key' is overridden with a function that just returns `n' and `kill-emacs' is overridden to do nothing. ARGS-RESULTS is a list of elements (FN-ARGS CALLERS-DIR EXPECTED), where @@ -2004,7 +2004,7 @@ CALLERS-DIR specifies the value to let-bind (setq nb-saved-buffers 0) (with-current-buffer (car buffers) (cl-letf - (((symbol-function 'read-event) + (((symbol-function 'read-key) ;; Increase counter and answer 'n' when prompted ;; to save a buffer. (lambda (&rest _) (cl-incf nb-saved-buffers) ?n)) -- 2.39.5