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

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

Re: condition-case


From: Stefan Monnier
Subject: Re: condition-case
Date: Thu, 09 Dec 2010 10:04:12 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Here's what Pascal posted originally.

The code looks fine (tho it needs a reindent to follow Elisp
convention).  The docstring needs a completely rewrite, OTOH, to follow
Elisp convention: first line should succintly describe the macro, and
the rest should give details about what it does and what each
param means.  I.e. someone not familiar with Common-Lisp should be able
to understand how to use it.

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

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


        Stefan


reply via email to

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