[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12938: 24.2; Lexical binding leaks into package-install somehow
From: |
Stefan Monnier |
Subject: |
bug#12938: 24.2; Lexical binding leaks into package-install somehow |
Date: |
Fri, 23 Nov 2012 16:50:58 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> Can you test the patch below to confirm it fixes the problem for you?
Forget it, that patch was at the wrong place (kill-all-local-variables)
gets called soon after that, defeating this approach. I've installed
the patch below instead, which seems to fix the problem.
Stefan
=== modified file 'lisp/emacs-lisp/bytecomp.el'
--- lisp/emacs-lisp/bytecomp.el 2012-11-20 19:05:20 +0000
+++ lisp/emacs-lisp/bytecomp.el 2012-11-23 21:44:46 +0000
@@ -1748,6 +1748,9 @@
;; There may be a file local variable setting (bug#10419).
(setq buffer-read-only nil
filename buffer-file-name))
+ ;; Don't inherit lexical-binding from caller (bug#12938).
+ (unless (local-variable-p 'lexical-binding)
+ (setq-local lexical-binding nil))
;; Set the default directory, in case an eval-when-compile uses it.
(setq default-directory (file-name-directory filename)))
;; Check if the file's local variables explicitly specify not to