diff options
| author | Noam Postavsky | 2016-11-04 21:40:16 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2016-11-04 21:40:16 -0400 |
| commit | db436e93cae16b34b951c2f210705fbd30ad2922 (patch) | |
| tree | 751f61da360c5d13c4f08a1398e26c682d0d36ae | |
| parent | acae275b2752357497a2411876b83240ce7c8aec (diff) | |
| download | emacs-db436e93cae16b34b951c2f210705fbd30ad2922.tar.gz emacs-db436e93cae16b34b951c2f210705fbd30ad2922.zip | |
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.
| -rw-r--r-- | lisp/emacs-lisp/cl-preloaded.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el index cd1d700f1b0..639ffa64b8c 100644 --- a/lisp/emacs-lisp/cl-preloaded.el +++ b/lisp/emacs-lisp/cl-preloaded.el | |||
| @@ -44,11 +44,9 @@ | |||
| 44 | (define-error 'cl-assertion-failed (purecopy "Assertion failed")) | 44 | (define-error 'cl-assertion-failed (purecopy "Assertion failed")) |
| 45 | 45 | ||
| 46 | (defun cl--assertion-failed (form &optional string sargs args) | 46 | (defun cl--assertion-failed (form &optional string sargs args) |
| 47 | (if debug-on-error | 47 | (if string |
| 48 | (debug `(cl-assertion-failed ,form ,string ,@sargs)) | 48 | (apply #'error string (append sargs args)) |
| 49 | (if string | 49 | (signal 'cl-assertion-failed `(,form ,@sargs)))) |
| 50 | (apply #'error string (append sargs args)) | ||
| 51 | (signal 'cl-assertion-failed `(,form ,@sargs))))) | ||
| 52 | 50 | ||
| 53 | ;; When we load this (compiled) file during pre-loading, the cl--struct-class | 51 | ;; When we load this (compiled) file during pre-loading, the cl--struct-class |
| 54 | ;; code below will need to access the `cl-struct' info, since it's considered | 52 | ;; code below will need to access the `cl-struct' info, since it's considered |