From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#6591: 24.0.50; incorrect doc for `catch' Date: Fri, 9 Jul 2010 08:52:05 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1278692300 14494 80.91.229.12 (9 Jul 2010 16:18:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 9 Jul 2010 16:18:20 +0000 (UTC) To: 6591@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 09 18:18:19 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OXGHG-0006co-4T for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Jul 2010 18:18:14 +0200 Original-Received: from localhost ([127.0.0.1]:54871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXG7F-0002hd-Km for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Jul 2010 12:07:53 -0400 Original-Received: from [140.186.70.92] (port=51290 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXG71-0000Gg-0S for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2010 12:07:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OXFzc-0007ls-53 for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2010 12:00:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57755) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXFzc-0007ln-14 for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2010 12:00:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OXFss-00054A-3I; Fri, 09 Jul 2010 11:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Jul 2010 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.127869075919460 (code B ref -1); Fri, 09 Jul 2010 15:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jul 2010 15:52:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXFsU-00053p-Qp for submit@debbugs.gnu.org; Fri, 09 Jul 2010 11:52:39 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXFsS-00053k-Bg for submit@debbugs.gnu.org; Fri, 09 Jul 2010 11:52:36 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:56910) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OXFsN-0003nS-G5 for submit@debbugs.gnu.org; Fri, 09 Jul 2010 11:52:31 -0400 Original-Received: from [140.186.70.92] (port=49282 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXFsL-0005RL-B4 for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2010 11:52:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OXFsK-0006RY-18 for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2010 11:52:29 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:63907) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXFsJ-0006RC-Pl for bug-gnu-emacs@gnu.org; Fri, 09 Jul 2010 11:52:27 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o69FqPFu014787 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 9 Jul 2010 15:52:26 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o695CZh0029246 for ; Fri, 9 Jul 2010 15:52:24 GMT Original-Received: from abhmt004.oracle.com by acsmt354.oracle.com with ESMTP id 413300931278690727; Fri, 09 Jul 2010 08:52:07 -0700 Original-Received: from dradamslap1 (/10.175.236.134) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 09 Jul 2010 08:52:07 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acsffq32BMeCz/ELTiKqd7im2jsvHQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4C3745B8.020C:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 09 Jul 2010 11:53:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38313 Archived-At: 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'