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

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

bug#6591: 24.0.50; incorrect doc for `catch'


From: Drew Adams
Subject: bug#6591: 24.0.50; incorrect doc for `catch'
Date: Sat, 10 Jul 2010 08:44:47 -0700

> > Ah! Then the syntax should be (catch TAG . BODY) or similar.
>                                           ^^^
> Why the period?

Same reason as your special `BODY...' syntax.  It means _splice in_ the list
BODY.  Or if you like, it means that BODY is the cdr of the sexp as a list.  Or
if you like, it is equivalent to ,@BODY in backquote syntax.

You cannot write just (catch TAG BODY).  There must be some indication (`.',
`...' or other) to distinguish normal substitution for a placeholder from
splicing substitution for a placeholder.  Substitution for TAG is treated
differently from substitution for BODY.

But are you just playing/kidding here? or arguing?  What's the point?  I'm sure
that you understand the syntax (A . B) in Lisp and in our docs.  I assume you
are trying to make some point, but I fail to see it.

Perhaps you simply want to hint that (A B...) is a notation that means the same
thing as (A . B).  If so, fine.

However:

1. I do not think the `...' syntax is described/defined anywhere in the doc.

2. More importantly (since it is anyway easy to miss such a definition), `...'
has a different meaning typically/commonly, so our interpretation (syntax
convention) of `...' can easily mislead and confuse.  Readers will tend to think
that BODY... means zero (or one) or more repetitions of BODY.  (Which is just
what I originally thought it was trying to say.)

So the syntax descriptors for catch, let, and progn are NOT incorrect, after
all.  It is the syntax convention that we've chosen that is misleading.  We are
entitled to any convention we like, as long as it is rigorous and we use it
consistently (which I'm not questioning now).  But it make sense not to use a
convention that can be easily mistaken for a different convention that is more
commonly used.  `...' commonly means repetition of whatever it follows, and
there is no repetition of BODY here (there is only one body).

You decide.






reply via email to

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