all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: PJ Weisberg <pj@irregularexpressions.net>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: window local var?
Date: Tue, 7 Sep 2010 09:12:35 -0700	[thread overview]
Message-ID: <AANLkTik9=XHCLRn5035Ttf1YY1osKfYr4_CsUGcv0VoM@mail.gmail.com> (raw)
In-Reply-To: <AANLkTim4qaHTGYXGWOsOVAdBCLBySCWsCki5xJ6H3_-d@mail.gmail.com>

On Mon, Sep 6, 2010 at 5:34 PM, PJ Weisberg <pj@irregularexpressions.net> wrote:

> (let ((env (frame-parameter (selected-frame) 'environment))
>      (current nil)
>      (dir nil))
>  (while (and (not dir) t)
>    (setq current (pop env))
>    (if (string-equal "PWD=" (subseq current 0 4))
>        (setq dir (subseq current 4))))
>  dir)

Um, that "t" in the conditional was supposed to be "env".  I wanted to
see what error I would get if I let it fall off the end of the list
without finding anything, and I forgot to put the check back in before
I pasted it into the mail. :-/



      reply	other threads:[~2010-09-07 16:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06 11:39 window local var? Marc Weber
2010-09-06 18:43 ` Andrea Crotti
2010-09-06 19:00   ` Marc Weber
2010-09-07  0:34     ` PJ Weisberg
2010-09-07 16:12       ` PJ Weisberg [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='AANLkTik9=XHCLRn5035Ttf1YY1osKfYr4_CsUGcv0VoM@mail.gmail.com' \
    --to=pj@irregularexpressions.net \
    --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.