]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix files-tests
authorGerd Möllmann <gerd,moellmann@gmail.com>
Fri, 7 Feb 2025 10:27:06 +0000 (11:27 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:43:09 +0000 (09:43 +0100)
* 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

index e085d052e1cc15eb36c7ce34e61039b8f93c9b88..5e2c4eb266997b3d3cf18578c2f68ef43734b86f 100644 (file)
@@ -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))