From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Schmitt Newsgroups: gmane.emacs.help Subject: Re: hooks and let-bound variables Date: Wed, 24 Jun 2015 11:13:31 +0200 Message-ID: References: <96506ece-5bd9-4750-8abd-128c77cf6c39@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1435137248 30924 80.91.229.3 (24 Jun 2015 09:14:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Jun 2015 09:14:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 24 11:14:00 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z7gko-0007E5-8Z for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jun 2015 11:13:58 +0200 Original-Received: from localhost ([::1]:49413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7gkn-0003ad-DD for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Jun 2015 05:13:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7gkd-0003aD-8y for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 05:13:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7gka-0000ZK-2M for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 05:13:47 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7gkZ-0000Z3-RV for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 05:13:43 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z7gkW-00074B-IZ for help-gnu-emacs@gnu.org; Wed, 24 Jun 2015 11:13:40 +0200 Original-Received: from charm-ecran.irisa.fr ([131.254.101.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Jun 2015 11:13:40 +0200 Original-Received: from alan.schmitt by charm-ecran.irisa.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Jun 2015 11:13:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 53 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: charm-ecran.irisa.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:KXOQ0bRD2Lic0d1uBiQwrJfvh+o= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105114 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Drew, On 2015-06-23 23:44, Drew Adams writes: >> I=E2=80=99m trying to get eshell-autojump to work but I=E2=80=99m getting >> errors about an undefined variable (curdir). This variable is bound by a >> let before a hook is called: > > Yes, but occurrences of that variable in the function called by the hook = are > not within the lexical scope of that let. It makes sense. And I now see the big "lexical-binding:t" at the top of the file =E2=80=A6 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 varia= ble > is to be dynamically scoped? It does not seem to work. Here is what I=E2=80=99m trying: M-: (defvar curdir) 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 =E2=80=A6 Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.4= 1 ppm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJVinS7AAoJEAQNCjtO0uXHEoQH/0CuUYKibW74bX3Jm3X3fgbj DTlHyNKQEzRnunRmuXCDthJTSDTHV1Z2KJKxxNnTgeQwpK/scgk3w2KE5uStUI8G LPEBZ52PfPJS8PXv6Ag3/rZE4JIs+jJ90povJlclgtMfY3h0p7PX/0TDNOmvpoSs 0tFr9n8KVicS6YCqXXHlO0thCThsDghmeSfzUgwwx/MJJiA4uZZCFZnjOcL1ZzD3 s8NJKLOABNF48s5BjR20S/mYHxZ7kE84rgM7fNg7NXZGgC/LcJ9OSULSrHjht/rG 96GhUJu39tAPujCrRwwAawd961T7k6bbpShb+L88IW4DeHSi5++vZQ4Zl1odt3k= =xBip -----END PGP SIGNATURE----- --=-=-=--