unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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

  List information: https://www.gnu.org/software/emacs/

* 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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).