GNU bug report logs - #13811
[Leo Liu] Byte-compile lexical-scoped elisp

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Mon, 25 Feb 2013 15:10:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#13811: closed ([Leo Liu] Byte-compile lexical-scoped elisp)
Date: Mon, 25 Feb 2013 16:09:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 25 Feb 2013 11:06:54 -0500
with message-id <jwv1uc4tmfo.fsf-monnier+emacs <at> gnu.org>
and subject line Re: Byte-compile lexical-scoped elisp
has caused the debbugs.gnu.org bug report #13811,
regarding [Leo Liu] Byte-compile lexical-scoped elisp
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
13811: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13811
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: [Leo Liu] Byte-compile lexical-scoped elisp
Date: Mon, 25 Feb 2013 10:07:56 -0500
[Message part 3 (text/plain, inline)]
Forwarding to get a bug-number.

[Message part 4 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Byte-compile lexical-scoped elisp
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
[Message part 5 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 13811-done <at> debbugs.gnu.org
Subject: Re: Byte-compile lexical-scoped elisp
Date: Mon, 25 Feb 2013 11:06:54 -0500
> 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


This bug report was last modified 12 years and 91 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.