Commit db436e93 authored by Noam Postavsky's avatar Noam Postavsky

Don't call debug on failed cl-assert

Doing this causes problems when running ert tests, for
instance (Bug#24778).  The call to `debug` when `debug-on-error' is
non-nil was introduced in 2015-02-14 "* lisp/emacs-lisp/cl*.el: Use
define-inline and move some code...".

* lisp/emacs-lisp/cl-preloaded.el (cl--assertion-failed): Don't call
`debug' directly.
parent acae275b
......@@ -44,11 +44,9 @@
(define-error 'cl-assertion-failed (purecopy "Assertion failed"))
(defun cl--assertion-failed (form &optional string sargs args)
(if debug-on-error
(debug `(cl-assertion-failed ,form ,string ,@sargs))
(if string
(apply #'error string (append sargs args))
(signal 'cl-assertion-failed `(,form ,@sargs)))))
(if string
(apply #'error string (append sargs args))
(signal 'cl-assertion-failed `(,form ,@sargs))))
;; When we load this (compiled) file during pre-loading, the cl--struct-class
;; code below will need to access the `cl-struct' info, since it's considered
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment