unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bug with lexical-binding and package-install?
@ 2012-11-19  6:50 Magnar Sveen
  2012-11-19 20:31 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Magnar Sveen @ 2012-11-19  6:50 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 958 bytes --]

I got a bug report yesterday in which my package was broken because lexical
scoping was suddenly in effect.

After some init-file-bisecting, this is the conclusion:

> It appears as though your first instinct about lexical-binding is
correct. I had a ;;; -*- lexical-binding: t -*- directive in my
init-packages.el file, which is responsible for downloading the installing
missing packages (of which multiple-cursors.el is one).
>
> It seems that if the file which calls package-install has that flag
turned on, it applies the lexical binding to the compiler, which results in
the following compiler warning:
>
> In mc/region-strings:
> mc-mark-more.el:78:20:Warning: assignment to free variable `strings'
>
> This warning doesn't appear in the compiler messages if lexical-binding
is nil.

This is on Emacs 24.2.1 on OS X. Full compiler warnings and code excerpts
can be found here:

https://github.com/magnars/multiple-cursors.el/issues/39

- Magnar Sveen

[-- Attachment #2: Type: text/html, Size: 1279 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug with lexical-binding and package-install?
  2012-11-19  6:50 Bug with lexical-binding and package-install? Magnar Sveen
@ 2012-11-19 20:31 ` Stefan Monnier
  2012-11-19 21:10   ` Magnar Sveen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2012-11-19 20:31 UTC (permalink / raw)
  To: Magnar Sveen; +Cc: emacs-devel

> It appears as though your first instinct about lexical-binding is
> correct. I had a ;;; -*- lexical-binding: t -*- directive in my
> init-packages.el file, which is responsible for downloading the installing
> missing packages (of which multiple-cursors.el is one).

What is "init-packages.el"?
"grep init-package **/*.el" doesn't find anything in Emacs's trunk.

I'm trying to understand how this could happen, which I find difficult
to imagine: lexical-binding is made buffer-local in every file that is
byte-compiled, so for an external lexical-binding setting to affect
byte-compilation, you'd have to call `byte-compile' directly rather than
via byte-compile-file.
At least that's the way the code should behave.

Oh, and please make it an actual bug-report rather than sending it here
on emacs-devel.


        Stefan



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug with lexical-binding and package-install?
  2012-11-19 20:31 ` Stefan Monnier
@ 2012-11-19 21:10   ` Magnar Sveen
  0 siblings, 0 replies; 3+ messages in thread
From: Magnar Sveen @ 2012-11-19 21:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

Sorry about that, I have sent a proper bug report with reproducible steps.



On Mon, Nov 19, 2012 at 9:31 PM, Stefan Monnier <monnier@iro.umontreal.ca>wrote:

> > It appears as though your first instinct about lexical-binding is
> > correct. I had a ;;; -*- lexical-binding: t -*- directive in my
> > init-packages.el file, which is responsible for downloading the
> installing
> > missing packages (of which multiple-cursors.el is one).
>
> What is "init-packages.el"?
> "grep init-package **/*.el" doesn't find anything in Emacs's trunk.
>
> I'm trying to understand how this could happen, which I find difficult
> to imagine: lexical-binding is made buffer-local in every file that is
> byte-compiled, so for an external lexical-binding setting to affect
> byte-compilation, you'd have to call `byte-compile' directly rather than
> via byte-compile-file.
> At least that's the way the code should behave.
>
> Oh, and please make it an actual bug-report rather than sending it here
> on emacs-devel.
>
>
>         Stefan
>

[-- Attachment #2: Type: text/html, Size: 1522 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-19 21:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19  6:50 Bug with lexical-binding and package-install? Magnar Sveen
2012-11-19 20:31 ` Stefan Monnier
2012-11-19 21:10   ` Magnar Sveen

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).