unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Andreas Schwab'" <schwab@linux-m68k.org>
Cc: 'Chong Yidong' <cyd@stupidchicken.com>,
	6591@debbugs.gnu.org, 'Richard Stallman' <rms@gnu.org>
Subject: bug#6591: 24.0.50; incorrect doc for `catch'
Date: Mon, 12 Jul 2010 07:56:33 -0700	[thread overview]
Message-ID: <5F77CAC8A1ED4CD19FFE4DA49C3BBF14@us.oracle.com> (raw)
In-Reply-To: <m3lj9hay4a.fsf@hase.home>

> > Is BODY repeated?
> 
> Yes.

Then there are multiple BODYs, which Eli denies.

And in that case, the accompanying text is incorrect and misleading, since it
speaks as if there is only one body (which Eli says is in fact the case).

You cannot have it both ways.  If BODY represents a sexp that can be repeated,
then there is not only one body that contains all of the sexps following TAG.
If BODY represents all of the sexps that follow tag, spliced in, then BODY is
not repeated.

Read the thread - this has all been gone over.


There are essentially two alternative solutions:

1. Use `...' to mean repetition of what it follows, as in the rest of the world.
And change BODY to FORM, in order not to mislead.  Then (catch TAG FORM...) says
exactly what it means: zero or more FORMs follow TAG.

2. Introduce an Emacs-only interpretation of `...' which means that what it
follows is a list to be spliced in.  In this case, postfix `...' is equivalent
to infix `.' (dot notation) and to a &rest parameter spec.


#2 is what Eli says that `...' means in Emacs syntax descriptions.  That is
unusual, but a legitimate choice.  Then (catch TAG BODY...) says that BODY is a
list of somethings (the accompanying text would say forms) that are spliced in.
So in (catch 'foo (a) (b) 42) the body is ((a) (b) 42).  The body is an implicit
`progn'.  BODY is a &rest parameter for `catch'.

If #2 is chosen, then the doc must explain the `...' notation somewhere. (It
should explain that notation in any case, but especially in the case where it
has an unconventional and unusual interpretation.)


#1 is my preference, because it is easier on readers and easier in terms of doc
maintenance.  It is consistent with what one finds outside Emacs.

What is a BUG is to use #2 with no explanation of the unusual syntax convention.






  reply	other threads:[~2010-07-12 14:56 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5F77CAC8A1ED4CD19FFE4DA49C3BBF14@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=6591@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=rms@gnu.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).