From ace6eba036e64ff9eee6965951c48d0634b9c696 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 1 Dec 2020 13:34:17 +0100 Subject: Fix byte-compiler warning for failed uses of lexical vars * lisp/emacs-lisp/bytecomp.el (byte-compile-form): Fix byte-compiler warning for failed uses of lexical vars. (Bug#44980) * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--define-warning-file-test): Don't prefix tests with 'warn'. (bytecomp/error-lexical-var-with-add-hook\.el) (bytecomp/error-lexical-var-with-remove-hook\.el) (bytecomp/error-lexical-var-with-run-hook-with-args-until-failure\.el) (bytecomp/error-lexical-var-with-run-hook-with-args-until-success\.el) (bytecomp/error-lexical-var-with-run-hook-with-args\.el) (bytecomp/error-lexical-var-with-symbol-value\.el): New tests. * test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-symbol-value.el: * test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args.el: * test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el: * test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-failure.el: * test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-remove-hook.el: * test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-add-hook.el: New files. --- .../error-lexical-var-with-run-hook-with-args-until-success.el | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el (limited to 'test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el') diff --git a/test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el b/test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el new file mode 100644 index 00000000000..96d10a343df --- /dev/null +++ b/test/lisp/emacs-lisp/bytecomp-resources/error-lexical-var-with-run-hook-with-args-until-success.el @@ -0,0 +1,3 @@ +;;; -*- lexical-binding: t; -*- +(let ((foo nil)) + (run-hook-with-args-until-success 'foo #'next-line)) -- cgit v1.2.3