all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Alan Schmitt <alan.schmitt@polytechnique.org>, help-gnu-emacs@gnu.org
Subject: RE: hooks and let-bound variables
Date: Wed, 24 Jun 2015 06:22:08 -0700 (PDT)	[thread overview]
Message-ID: <cabbccb8-1351-44a3-b7f9-f23e99befc6c@default> (raw)
In-Reply-To: <m2pp4lmptw.fsf@polytechnique.org>

> It makes sense. And I now see the big "lexical-binding:t" at the top
> of the file … I guess this was recently changed and is the reason it no
> longer works.
> 
> > What happens if you add (defvar curdir), to let Emacs know that
> > the variable is to be dynamically scoped?
> 
> It does not seem to work. Here is what I’m trying:
> M-: (defvar curdir)

Try putting that in the file that has the lexical-binding
declaration. Or evaluating that before that file gets compiled or
loaded.

> then use autojump, but it tells me the value of curdir is still
> void. I guess I need to change the code of eshell for this to work …

Maybe someone else will have a better suggestion.  But I think that's
the problem anyway: `curdir' is being handled as a lexical variable
when the code that invokes the hook function is run.



  reply	other threads:[~2015-06-24 13:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 19:15 hooks and let-bound variables Alan Schmitt
2015-06-23 21:44 ` Drew Adams
2015-06-24  9:13   ` Alan Schmitt
2015-06-24 13:22     ` Drew Adams [this message]
2015-06-24 13:35       ` Alan Schmitt
2015-06-24 14:44         ` Drew Adams
2015-06-24 15:48           ` tomas

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=cabbccb8-1351-44a3-b7f9-f23e99befc6c@default \
    --to=drew.adams@oracle.com \
    --cc=alan.schmitt@polytechnique.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.