unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6591: 24.0.50; incorrect doc for `catch'
@ 2010-07-09 15:52 Drew Adams
  2010-07-09 17:48 ` Eli Zaretskii
  2010-07-10  5:44 ` MON KEY
  0 siblings, 2 replies; 51+ messages in thread
From: Drew Adams @ 2010-07-09 15:52 UTC (permalink / raw)
  To: 6591

Both in the doc string and the Elisp manual the doc for `catch' is
wrong, or at best misleading.
 
The syntax is given as (catch TAG BODY...).  But the description refers
to BODY as if there were only one BODY, and it refers to "the forms of
the BODY", by which it probably means to refer to the BODYs, that is,
the BODY items in the list (BODY...).
 
"BODY" is anyway the wrong term to use here, as it suggests (even if it
does not imply) that only one such sexp is allowed.  But more
importantly, it is incorrect to refer to "the forms of the BODY" when
what is really meant is the list of BODYs.
 
When the doc says "the value of the last body form is returned" it
really means that the value of the last BODY sexp is returned - not the
last form in BODY.  (In this case, the wording would not be so bad, if
the rest of the passage were correct and clear - and if BODY were
uppercase.)
 
If you grep the Emacs Lisp sources, you will find very few uses (none?)
of `catch' where there is more than one BODY sexp.  Dunno if this might
partly be a result of confusion over the syntax.  Probably not.  But it
wouldn't hurt to clarify the doc, making it clear that you can have any
number of sexps after TAG, and that the value of the last such sexp is
returned if no throw occurs.
 
And do not call these sexps "bodies" - there is typically only one
"body" in a Lisp form.  You might speak of the "body" of a `progn', a
`let', or a `catch', but you should not call each of the sexps in such a
body "BODY".  Together, the sexps in a `progn' form its body, but each
is not individually a BODY.
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-06-28 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include'
 






^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2010-12-20 12:25 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-09 15:52 bug#6591: 24.0.50; incorrect doc for `catch' Drew Adams
2010-07-09 17:48 ` Eli Zaretskii
2010-07-09 19:36   ` Drew Adams
2010-07-10  7:48     ` Eli Zaretskii
2010-07-10 14:14       ` Drew Adams
2010-07-10 14:38         ` Eli Zaretskii
2010-07-10 15:44           ` Drew Adams
2010-07-10 15:55             ` Eli Zaretskii
2010-07-11  4:21               ` Drew Adams
2010-07-11  6:15                 ` Eli Zaretskii
2010-07-11  8:14                   ` Štěpán Němec
2010-07-11  9:22                     ` Eli Zaretskii
2010-07-11 10:59                       ` Štěpán Němec
2010-07-11 13:23                         ` Eli Zaretskii
2010-07-11 13:44                           ` Štěpán Němec
2010-07-11 14:00                             ` Eli Zaretskii
2010-07-11 15:26                               ` Andreas Schwab
2010-07-11 15:33                                 ` Drew Adams
2010-07-11 17:22                                 ` Eli Zaretskii
     [not found]                               ` <mailman.11.1278862210.6344.bug-gnu-emacs@gnu.org>
2010-07-11 22:36                                 ` Tim X
     [not found]                           ` <mailman.2.1278856813.6344.bug-gnu-emacs@gnu.org>
2010-07-11 22:34                             ` Tim X
2010-12-08 15:52                               ` Drew Adams
2010-12-20 12:25                                 ` Chong Yidong
2010-07-11 15:33                   ` Drew Adams
2010-07-11 17:25                     ` Eli Zaretskii
2010-07-11 16:33                   ` Chong Yidong
2010-07-11 16:52                     ` Drew Adams
2010-07-11 17:13                       ` Chong Yidong
2010-07-11 17:58                         ` Drew Adams
2010-07-11 18:14                       ` Andreas Schwab
2010-07-11 19:10                         ` Drew Adams
2010-07-11 19:40                           ` Andreas Schwab
2010-07-11 20:07                             ` Drew Adams
2010-07-11 21:22                               ` Andreas Schwab
2010-07-11 21:42                                 ` Chong Yidong
2010-07-11 21:44                                 ` Drew Adams
2010-07-12  8:43                                   ` Andreas Schwab
2010-07-12 14:56                                     ` Drew Adams
2010-07-12 15:26                                       ` Andreas Schwab
2010-07-12 16:01                                         ` Drew Adams
2010-07-12 16:11                                           ` Andreas Schwab
2010-07-12 16:31                                             ` Drew Adams
2010-07-12 16:36                                               ` Andreas Schwab
2010-07-12 16:50                                                 ` Drew Adams
2010-07-12 18:14                                                   ` Andreas Schwab
2010-07-12 18:35                                                     ` Drew Adams
2010-07-12 18:41                                                       ` Andreas Schwab
2010-07-12 18:49                                                         ` Drew Adams
2010-07-12 17:02                                           ` Eli Zaretskii
2010-07-12 18:30                                             ` Drew Adams
2010-07-10  5:44 ` MON KEY

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).