Subject: bug#20066: 24.4; should-error and cl-assert

From: Wolfgang Jenkner <[email-masked]>
Date: Mon, 09 Mar 2015 17:12:35 +0100

On Mon, Mar 09 2015, Leo Liu wrote:

> I just compiled emacs 25.0.50 from git and I have immediately noticed
> the following difference:
>
> 1. (should-error (error "yes"))
> 2. (should-error (cl-assert nil t))
>
> Test 1 succeeds but test 2 fails. In emacs 24.4, both tests succeed.
> Could someone investigate what have caused this incompatibility?

commit 61b4c22c6eba96718327a0d208a8492d8bad76e0
Author: Stefan Monnier <[email-masked]>
Date:   Sat Feb 14 00:46:29 2015 -0500

[...]
    (cl--assertion-failed): New function.

+(defun cl--assertion-failed (form &optional string sargs args)
+  (if debug-on-error
+      (debug `(cl-assertion-failed ,form ,string ,@sargs))

So, `debug' is explicitly called now, which circumvents the normal
call-chain: signal > maybe_call_debugger > call_debugger > debug