On 2015-06-24 15:22, Drew Adams writes: >> 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. Thank you for the suggestions. The eshell-autojump author fixed it and it’s now working correctly. (I find very funny that I only use languages with lexical binding, but can still be bitten by it in emacs-lisp.) Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm