unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Magnar Sveen <magnars@gmail.com>
Cc: 12938-done@debbugs.gnu.org
Subject: bug#12938: 24.2; Lexical binding leaks into package-install somehow
Date: Fri, 23 Nov 2012 16:50:58 -0500	[thread overview]
Message-ID: <jwvobioat27.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <jwvtxsgatyc.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 23 Nov 2012 16:31:23 -0500")

> 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






      reply	other threads:[~2012-11-23 21:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 21:07 bug#12938: 24.2; Lexical binding leaks into package-install somehow Magnar Sveen
2012-11-20 18:53 ` Glenn Morris
2012-11-21  4:56   ` Glenn Morris
2012-11-23 21:31 ` Stefan Monnier
2012-11-23 21:50   ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvobioat27.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=12938-done@debbugs.gnu.org \
    --cc=magnars@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).