1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

; Fix files-tests

* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Override symbol function of read-key instead of read-event.
This commit is contained in:
Gerd Möllmann 2025-02-07 11:27:06 +01:00
parent f6e6585f57
commit 92aecdfd9f

View 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))