]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/files.el (internal--get-default-lexical-binding): Handle nested loads
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 8 Apr 2025 02:48:01 +0000 (22:48 -0400)
committerEshel Yaron <me@eshelyaron.com>
Tue, 8 Apr 2025 05:50:35 +0000 (07:50 +0200)
(cherry picked from commit 9dc6177206a10efcc3a25894aa7aabaa54044adc)

lisp/files.el

index 7228f28e726f243435f57a0e93eeb7762f61a63e..cc87651eea86bcd6eb09dd57268c076d1089590d 100644 (file)
@@ -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))