From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 425c281 1/3: Allow t as a catch-all condition-case handler (Bug#24618) Date: Thu, 6 Sep 2018 21:01:31 -0400 Message-ID: References: <20180904230314.12505.44942@vcs0.savannah.gnu.org> <20180904230315.6EB44209DC@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1536282047 11656 195.159.176.226 (7 Sep 2018 01:00:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2018 01:00:47 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 07 03:00:43 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fy58c-0002w4-Vh for ged-emacs-devel@m.gmane.org; Fri, 07 Sep 2018 03:00:43 +0200 Original-Received: from localhost ([::1]:36017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fy5Aj-0000YG-7J for ged-emacs-devel@m.gmane.org; Thu, 06 Sep 2018 21:02:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fy59f-0000XC-RT for emacs-devel@gnu.org; Thu, 06 Sep 2018 21:01:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fy59Z-0002wg-Sz for emacs-devel@gnu.org; Thu, 06 Sep 2018 21:01:44 -0400 Original-Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:35588) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fy59U-0002lq-H5 for emacs-devel@gnu.org; Thu, 06 Sep 2018 21:01:38 -0400 Original-Received: by mail-oi0-x22d.google.com with SMTP id m11-v6so24264242oic.2 for ; Thu, 06 Sep 2018 18:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LJnHpl2wJHjttU/HXsnD3qsoKr8cvNgrOGyanTRib/w=; b=oWLuHBPbuoquh6FXyOZXY+H0Jk7l/ezz2DN5kAkk6/vzSFTWYKm1uyl7eSlHEh6mjw tW1GoLIFTia7XLYxaBXvDawCnLTAFV58Sdp0I8HrwkynoHyqjAj7UfIxjzN3sZ4xPjVJ d96EMdCfFFsTahrQgABuVRCSw40UMOE2MQ+byNv6TWwMo3U/Qptbf9Khlln4I0pqkmEQ rp4nmSkXsenXVbRUzDAbu4wQ/KoQifVbmM1RBH3/s+JPyx6BgBx0QpFZeyGAvbruSNZ8 +t6fy8jKuMt9S2MyGwHS8fRYsClUmRGbEVGYovocKkyYwz4onCe7xjmL/78jKFCTfspq 6m8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=LJnHpl2wJHjttU/HXsnD3qsoKr8cvNgrOGyanTRib/w=; b=sqP2MEY2G180junYVp884dPencEBLUjyRbuyy34Vy7s3wcFfAXAOutFdCOhALLYqrC eH9CQGSMKI08qyTcspGmgydZi1BluacgprUlCYtaVPE+/k4V9Ie3IfBgfC0CF5E9eegt 9bxmfiYZvM5+FZ3Z3d9Ou1L+ArcRaVRuu3NWrXS1dEzMzPNJs7+jOUm19eJ/ES1gNQxu T2KHHzFyeZE73Jl/4DY5Ps45VHx9VzPOQz2jOOrEXMBSlMZ8K+zA/1BlG5GBkp59ZoL9 IRETdB9ptqOimcRAZK8todWxcpciZ3a0vYAchj6LrDpHJmGgxVkB+uNWVvwTj0ySXp04 CChQ== X-Gm-Message-State: APzg51C+FU3z2jElQOtx9uWKrSdLB8DH6o3dVW235tSYR5fDHfMhSs10 4nPJFdwYeO1MXEIQINt1kVT4U4JYkP/K1iHlohE= X-Google-Smtp-Source: ANB0VdZXe+TNiRT83g6egMya9G6ENMO44GRS/Mfp7N9JEqPVqWHSEd2gZTyygUG4ukKzBKJj5dIt31fGatde4LyIvic= X-Received: by 2002:aca:db09:: with SMTP id s9-v6mr5259783oig.339.1536282092085; Thu, 06 Sep 2018 18:01:32 -0700 (PDT) Original-Received: by 2002:a9d:540f:0:0:0:0:0 with HTTP; Thu, 6 Sep 2018 18:01:31 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229364 Archived-At: On 5 September 2018 at 11:31, Stefan Monnier wrote: >> Hmm, right. The rest of the docstring talks only about errors though. >> Should we change the whole thing? While technically more accurate, >> saying "Regain control when a signal is signaled" sounds a bit funny. > > I think the solution normally used is that "signal" is only used for the > action, while the event-object is called "condition". I.e. > "Regain control when a condition is signaled". So how about this: DEFUN ("condition-case", Fcondition_case, Scondition_case, 2, UNEVALLED, 0, - doc: /* Regain control when an error is signaled. -Executes BODYFORM and returns its value if no error happens. + doc: /* Regain control when a condition is signaled. +Executes BODYFORM and returns its value if nothing is signaled. Each element of HANDLERS looks like (CONDITION-NAME BODY...) where the BODY is made of Lisp expressions. -A handler is applicable to an error if CONDITION-NAME is one of the -error's condition names. A CONDITION-NAME of t applies to any error -symbol. If an error happens, the first applicable handler is run. +A handler is applicable to a condition if CONDITION-NAME is one of the +condition's names. A CONDITION-NAME of t applies to any condition +name. If a condition is signaled, the first applicable handler is run. The car of a handler may be a list of condition names [...] -When a handler handles an error, control returns to the `condition-case' +When a handler handles a condition, control returns to the `condition-case' and it executes the handler's BODY... with VAR bound to (ERROR-SYMBOL . SIGNAL-DATA) from the error.