unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert
Date: Sun, 29 Jan 2017 16:09:50 -0500	[thread overview]
Message-ID: <ac130f0b-9d0e-6983-3bfe-f8ee961c8f2c@gmail.com> (raw)
In-Reply-To: <CAM-tV--tu5sZ0RDo-GEafTTbH=bmB1WX6mAO=4NnDzYCwJE14Q@mail.gmail.com>

On 2017-01-29 10:37, Noam Postavsky wrote:
> On Fri, Jan 27, 2017 at 10:46 PM, Noam Postavsky
> <npostavs@users.sourceforge.net> wrote:
>> On Fri, Jan 27, 2017 at 10:30 PM, Clément Pit--Claudel
>> <clement.pit@gmail.com> 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	other threads:[~2017-01-29 21:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20161105015720.6371.89806@vcs.savannah.gnu.org>
     [not found] ` <20161105015720.88A6322012D@vcs.savannah.gnu.org>
2016-11-05 17:22   ` [Emacs-diffs] emacs-25 db436e9: Don't call debug on failed cl-assert Stefan Monnier
2016-11-06 18:28     ` Noam Postavsky
2016-11-06 22:47       ` Stefan Monnier
2016-11-08  1:12         ` Noam Postavsky
2016-11-08 13:17           ` Stefan Monnier
2016-11-08 14:32             ` Stefan Monnier
2016-11-09  0:55               ` Noam Postavsky
2017-01-28  1:16                 ` Clément Pit--Claudel
2017-01-28  1:59                   ` Noam Postavsky
2017-01-28  3:30                     ` Clément Pit--Claudel
2017-01-28  3:46                       ` Noam Postavsky
2017-01-29 15:37                         ` Noam Postavsky
2017-01-29 21:09                           ` Clément Pit-Claudel [this message]
2017-01-31  2:53                             ` Noam Postavsky
2016-11-06 19:03     ` Philipp Stephani
2017-01-28  1:13       ` Clément Pit-Claudel

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=ac130f0b-9d0e-6983-3bfe-f8ee961c8f2c@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).