From: Noam Postavsky <npostavs@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs developers <emacs-devel@gnu.org>
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 [thread overview]
Message-ID: <CAM-tV-_P6vWQ5SrJxE9cfoF6-h+DGPNJMKjr+g+1SMSWbcuD1A@mail.gmail.com> (raw)
In-Reply-To: <jwv36uoarok.fsf-monnier+emacsdiffs@gnu.org>
On 5 September 2018 at 11:31, Stefan Monnier <monnier@iro.umontreal.ca> 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.
next prev parent reply other threads:[~2018-09-07 1:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180904230314.12505.44942@vcs0.savannah.gnu.org>
[not found] ` <20180904230315.6EB44209DC@vcs0.savannah.gnu.org>
2018-09-05 2:46 ` [Emacs-diffs] master 425c281 1/3: Allow t as a catch-all condition-case handler (Bug#24618) Stefan Monnier
2018-09-05 14:38 ` Noam Postavsky
2018-09-05 15:31 ` Stefan Monnier
2018-09-07 1:01 ` Noam Postavsky [this message]
2018-09-07 1:08 ` Stefan Monnier
2018-09-07 1:10 ` Davis Herring
2018-09-08 2:16 ` Noam Postavsky
2018-09-17 0:40 ` Noam Postavsky
2018-09-07 6:51 ` Eli Zaretskii
2018-09-07 7:00 ` Davis Herring
2018-09-07 7:24 ` Eli Zaretskii
[not found] ` <<83ftylvkgw.fsf@gnu.org>
2018-09-07 15:19 ` Drew Adams
[not found] ` <<83in3hvlyx.fsf@gnu.org>
2018-09-07 15:17 ` Drew Adams
2018-09-05 15:31 ` Stefan Monnier
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=CAM-tV-_P6vWQ5SrJxE9cfoF6-h+DGPNJMKjr+g+1SMSWbcuD1A@mail.gmail.com \
--to=npostavs@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).