From: Stefan Monnier Date: Tue, 8 Apr 2025 02:48:01 +0000 (-0400) Subject: lisp/files.el (internal--get-default-lexical-binding): Handle nested loads X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6a9c353d99482bf87d6f9296cfe341311465c290;p=emacs.git lisp/files.el (internal--get-default-lexical-binding): Handle nested loads (cherry picked from commit 9dc6177206a10efcc3a25894aa7aabaa54044adc) --- diff --git a/lisp/files.el b/lisp/files.el index 7228f28e726..cc87651eea8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4290,7 +4290,9 @@ You can add one with `M-x elisp-enable-lexical-binding RET'. See `%s' and `%s' for more information." (if (not (and (bufferp from) - (equal (buffer-name from) " *load*") + (string-match-p + "\\` \\*load\\*\\(-[0-9]+\\)?\\'" + (buffer-name from)) load-file-name)) from (abbreviate-file-name load-file-name))