diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index aadfc4c335a..b1875dc2bcf 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2270,6 +2270,7 @@ See also `emacs-lisp-byte-compile-and-load'." filename buffer-file-name)) ;; Don't inherit lexical-binding from caller (bug#12938). (unless (or (local-variable-p 'lexical-binding) + no-byte-compile bytecomp--inhibit-lexical-cookie-warning) (let ((byte-compile-current-buffer (current-buffer))) (displaying-byte-compile-warnings