emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Occur stack


From: Tom
Subject: Re: Occur stack
Date: Sun, 19 Jan 2014 06:40:58 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> 
> >      (eval `(let ((dir default-directory)
> >                   (args command-args))
> >               (lambda ()
> >                 (let ((default-directory dir))
> >                   (grep-find args))))
> >            t))))
> 
> Yuck!
> 

This is the first time I used closures, so it may be crude.

Is there a simpler way to write this? First I tried to
set default-directory in the outer let, but then it had
apparently no effect on grep-find.

Hmm, I tried it again and it worked, so I must have had
some other error when I wrote this.

Is this the simplest way then? Or can it be simplified more?

     (eval `(let ((default-directory default-directory)
                  (args command-args))
              (lambda ()
                (grep-find args)))
           t))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]