emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bell


From: Stefan Monnier
Subject: Re: Bell
Date: Tue, 30 Mar 2010 20:24:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>> +      (signal (car err) nil)))
>> Is there a particular reason why you used nil rather than (cdr err) as
>> second argument?
> The only reason is that other line-oriented commands in simple.el
> call `signal' explicitly with the second arg nil like:

>   (signal 'beginning-of-buffer nil)
>   (signal 'end-of-buffer nil)

> If it's more reliable with (cdr err), I will add it.

It's not that it's more reliable, it's just that (cdr err) holds the
info that was provided in the second arg of `signal' in the the signal
caught by the condition-case, so it makes sense to propagate it further,
whether it's nil or not.
I.e. (signal (car err) (cdr err)) is the canonical way to re-throw
a signal previously caught by condition-case.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]