From 247701953afe4c6018b46cf9a6c3fa89d8a8ee37 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Jul 2025 20:50:57 +0300 Subject: [PATCH] ; Avoid lexical-binding warning in lread-tests * test/src/lread-tests.el (lread-test-bug-31186) (lread-tests--unescaped-char-literals): Avoid lexical-binding warning. (cherry picked from commit 7300f5000785a942a14847fccb534748f53e0628) --- test/src/lread-tests.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index 51c93b38e4f..02e3efcf06c 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el @@ -154,7 +154,10 @@ literals (Bug#20852)." (ert-with-temp-file file-name (write-region "?) ?( ?; ?\" ?[ ?]" nil file-name) - (should (equal (load file-name nil :nomessage :nosuffix) t)) + (should (equal + (let ((warning-inhibit-types '((files missing-lexbind-cookie)))) + (load file-name nil :nomessage :nosuffix)) + t)) (should (equal (lread-tests--last-message) (format-message (concat "Loading `%s': " @@ -200,7 +203,8 @@ literals (Bug#20852)." (should-not ;; This used to crash in lisp_file_lexically_bound_p before the ;; bug was fixed. - (eval-buffer)))) + (let ((warning-inhibit-types '((files missing-lexbind-cookie)))) + (eval-buffer))))) (ert-deftest lread-invalid-bytecodes () (should-error -- 2.39.5