emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert


From: Clément Pit-Claudel
Subject: Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert
Date: Sun, 29 Jan 2017 16:09:50 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 2017-01-29 10:37, Noam Postavsky wrote:
> On Fri, Jan 27, 2017 at 10:46 PM, Noam Postavsky
> <address@hidden> wrote:
>> On Fri, Jan 27, 2017 at 10:30 PM, Clément Pit--Claudel
>> <address@hidden> wrote:
>>> On 2017-01-27 20:59, Noam Postavsky wrote:
>>>> I guess let-binding `debugger' to a function which performs the
>>>> logging should do the trick?
>>>
>>> I already do that, in fact, and I do re-throw the exception from there.  
>>> Looks like things didn't work because of the way `debugger' is called in 
>>> `cl--assertion-failed'.  Is that call correct?  The argument in (funcall 
>>> debugger `(cl-assertion-failed ,form ,string ,@sargs)) doesn't seem to 
>>> match the docs:
>>>
>>>     If due to error, args are ‘error’ and a list of the args to ‘signal’.
>>>
>>> Is the call just missing an 'error argument?
>>>
>>
>> Oh yeah, I guess it is.
> 
> Um, should this be
> 
> (funcall debugger 'error `(cl-assertion-failed ,form ,string ,@sargs))
> 
> or
> 
> (funcall debugger 'error `(cl-assertion-failed (,form ,string ,@sargs)))
> 
> I'm getting confused with all the levels of nesting and funcall/apply.


I think the second one.  `debugger' gets two arguments, 'error and a list of 
arguments to `signal'.  That list should have two entries: 
`cl-assertion-failed' and `(,form ,string ,@sargs).

Thanks! 



reply via email to

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