From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.bugs Subject: bug#6375: 23.1; elisp manual example condition-case re-signal of error Date: Tue, 08 Jun 2010 11:47:03 +1000 Message-ID: <87r5kii9d4.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1275962303 25468 80.91.229.12 (8 Jun 2010 01:58:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Jun 2010 01:58:23 +0000 (UTC) To: 6375@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 08 03:58:22 2010 connect(): No such file or directory 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 1OLo57-0005gv-I0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Jun 2010 03:58:21 +0200 Original-Received: from localhost ([127.0.0.1]:48013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLo56-00027v-IL for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Jun 2010 21:58:20 -0400 Original-Received: from [140.186.70.92] (port=34669 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLo4u-00025p-6l for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2010 21:58:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLo4s-0000Ck-Dy for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2010 21:58:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45105) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLo4s-0000Cg-Al for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2010 21:58:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OLnw6-0007RY-E7; Mon, 07 Jun 2010 21:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Ryde Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Jun 2010 01:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6375 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.127596168728596 (code B ref -1); Tue, 08 Jun 2010 01:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jun 2010 01:48:07 +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 1OLnvD-0007RB-8D for submit@debbugs.gnu.org; Mon, 07 Jun 2010 21:48:07 -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 1OLnvB-0007Qp-1S for submit@debbugs.gnu.org; Mon, 07 Jun 2010 21:48:06 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:39667) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OLnv7-00033b-8n for submit@debbugs.gnu.org; Mon, 07 Jun 2010 21:48:01 -0400 Original-Received: from [140.186.70.92] (port=42717 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLnv5-0006hA-Ma for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2010 21:48:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLnv3-0007b9-Bp for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2010 21:47:59 -0400 Original-Received: from mailout1-3.pacific.net.au ([61.8.2.210]:42014 helo=mailout1.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLnv2-0007am-NQ for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2010 21:47:57 -0400 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id D1FE358A296 for ; Tue, 8 Jun 2010 11:47:52 +1000 (EST) Original-Received: from blah.blah (ppp287C.dyn.pacific.net.au [61.8.40.124]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 13EF527408 for ; Tue, 8 Jun 2010 11:47:46 +1000 (EST) Original-Received: from gg by blah.blah with local (Exim 4.71) (envelope-from ) id 1OLnuB-0002vG-Tg for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2010 11:47:03 +1000 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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: Mon, 07 Jun 2010 21:49: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:37592 Archived-At: --=-=-= I had to scratch my head a bit a while ago to find out how a condition-case handler should re-signal an error. It'd be good if the elisp manual had an example of that. Just one line, as that section is a bit wordy already. There were two spots in emacs itself wrongly doing an apply instead of a call for such a re-signal, so I suppose I'm not the only one to be confused. (The one in cedet/semantic/wisent.el might still be there.) 2010-06-08 Kevin Ryde * control.texi (Handling Errors): Show example of condition-case handler re-signalling an error. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=control.texi.re-signal-error.diff --- control.texi.~1.7.~ 2009-02-24 08:41:24.000000000 +1100 +++ control.texi 2009-11-02 15:26:38.000000000 +1100 @@ -1019,7 +1019,11 @@ . @var{data})}. The handler can refer to this list to decide what to do. For example, if the error is for failure opening a file, the file name is the second element of @var{data}---the third element of the -error description. +error description. The handler can re-signal the error with + +@example +(signal (car var) (cdr var)) ;; re-signal +@end example If @var{var} is @code{nil}, that means no variable is bound. Then the error symbol and associated data are not available to the handler. --=-=-= In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' --=-=-=--