all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13811: [Leo Liu] Byte-compile lexical-scoped elisp
@ 2013-02-25 15:07 Stefan Monnier
  2013-02-25 16:06 ` bug#13811: " Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2013-02-25 15:07 UTC (permalink / raw)
  To: 13811; +Cc: Leo Liu

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

Forwarding to get a bug-number.


[-- Attachment #2: Type: message/rfc822, Size: 2731 bytes --]

From: Leo Liu <sdl.web@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Byte-compile lexical-scoped elisp
Date: Mon, 25 Feb 2013 20:43:53 +0800
Message-ID: <m2hal0h8c6.fsf@gmail.com>

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

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

* bug#13811: Byte-compile lexical-scoped elisp
  2013-02-25 15:07 bug#13811: [Leo Liu] Byte-compile lexical-scoped elisp Stefan Monnier
@ 2013-02-25 16:06 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2013-02-25 16:06 UTC (permalink / raw)
  To: Leo Liu; +Cc: 13811-done

> 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





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

end of thread, other threads:[~2013-02-25 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 15:07 bug#13811: [Leo Liu] Byte-compile lexical-scoped elisp Stefan Monnier
2013-02-25 16:06 ` bug#13811: " Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.