[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: hooks and let-bound variables
From: |
Drew Adams |
Subject: |
RE: hooks and let-bound variables |
Date: |
Wed, 24 Jun 2015 06:22:08 -0700 (PDT) |
> 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.