help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: condition-case


From: Ted Zlatanov
Subject: Re: condition-case
Date: Mon, 13 Dec 2010 11:10:30 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

On Fri, 10 Dec 2010 12:40:06 -0600 Ted Zlatanov <tzz@lifelogs.com> wrote: 

TZ> On Thu, 09 Dec 2010 10:04:12 -0500 Stefan Monnier 
<monnier@iro.umontreal.ca> wrote: 

>>> (subst  var (car clausvar) body)))))

SM> Oh wait, I just noticed this one: `subst' is wrong here.  I know CL
SM> already uses it for similar purposes elsewhere, but it's simply wrong
SM> because `subst' doesn't know about Elisp binding rules.
SM> So (subst 'b 'a '(lambda () '(a b c))) will happily return
SM> (lambda () '(b b c)).  Better simply use `let', even if it has
SM> a performance cost.

TZ> I didn't catch that.  I don't know enough about ELisp vs. CL scoping and
TZ> binding rules to write this properly, unfortunately.  Can you show how
TZ> `let' could be used?  I'll take the code and provide the doc string and
TZ> reindent it, then propose the revised version in emacs-devel.

...in other words, in the example you showed, is it just

(let ((b a))
  (lambda () '(b b c)))

or is it more complicated?

Ted


reply via email to

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