Subject: bug#13811: closed (Re: Byte-compile lexical-scoped elisp)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 25 Feb 2013 16:09:02 +0000

Your bug report

#13811: [Leo Liu] Byte-compile lexical-scoped elisp

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13811: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13811
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: Byte-compile lexical-scoped elisp
From: Stefan Monnier <[email-masked]>
To: Leo Liu <[email-masked]>
Cc: [email-masked]
Date: Mon, 25 Feb 2013 11:06:54 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

> The steps to reproduce:
> 1. wget https://github.com/leoliu/ack-el/raw/master/ack.el
> 2. Emacs -q -l ack.el
> 3. M-x ack
> file-name-nondirectory: Symbol's value as variable is void: project-root

Indeed, the problem is that the dynamic binding of project-root is
created inside the `interactive' spec and that spec is not run in the
proper lexical environment (it is run in lexical mode, but in an empty
lexical environment).

> Could you help me understand what is wrong here?

A bug in Emacs.  Should be fixed on the trunk now.

BTW, please add an "ack--" prefix to your `project-root' var: all
`defvar'd variables should have such a prefix.

        Stefan

Subject: [Leo Liu] Byte-compile lexical-scoped elisp
From: Stefan Monnier <[email-masked]>
To: [email-masked]
Date: Mon, 25 Feb 2013 10:07:56 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Forwarding to get a bug-number.

Subject: Byte-compile lexical-scoped elisp
From: Leo Liu <[email-masked]>
To: Stefan Monnier <[email-masked]>
Date: Mon, 25 Feb 2013 20:43:53 +0800

Hello Stefan,

I got a bug report on ack.el (https://github.com/leoliu/ack-el/issues/1)
when running ack.el uncompiled.

The steps to reproduce:

1. wget https://github.com/leoliu/ack-el/raw/master/ack.el
2. Emacs -q -l ack.el
3. M-x ack

file-name-nondirectory: Symbol's value as variable is void: project-root

Could you help me understand what is wrong here? It seems when
uncompiled project-root is not treated as a special variable.

Thank you,
Leo