all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo Liu <sdl.web@gmail.com>
Cc: 13811-done@debbugs.gnu.org
Subject: bug#13811: Byte-compile lexical-scoped elisp
Date: Mon, 25 Feb 2013 11:06:54 -0500	[thread overview]
Message-ID: <jwv1uc4tmfo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <jwvobf8tou1.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 25 Feb 2013 10:07:56 -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





      reply	other threads:[~2013-02-25 16:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 15:07 bug#13811: [Leo Liu] Byte-compile lexical-scoped elisp Stefan Monnier
2013-02-25 16:06 ` 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

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

  git send-email \
    --in-reply-to=jwv1uc4tmfo.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=13811-done@debbugs.gnu.org \
    --cc=sdl.web@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 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.