summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/cl-print.el13
-rw-r--r--lisp/subr.el6
2 files changed, 10 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el
index 4fc178c29aa..5a26ecf05fe 100644
--- a/lisp/emacs-lisp/cl-print.el
+++ b/lisp/emacs-lisp/cl-print.el
@@ -269,12 +269,13 @@ Output is further controlled by the variables
`cl-print-readably', `cl-print-compiled', along with output
variables for the standard printing functions. See Info
node `(elisp)Output Variables'."
- (cond
- (cl-print-readably (prin1 object stream))
- ((not print-circle) (cl-print-object object stream))
- (t
- (let ((cl-print--number-table (cl-print--preprocess object)))
- (cl-print-object object stream)))))
+ (if cl-print-readably
+ (prin1 object stream)
+ (with-demoted-errors "cl-prin1: %S"
+ (if (not print-circle)
+ (cl-print-object object stream)
+ (let ((cl-print--number-table (cl-print--preprocess object)))
+ (cl-print-object object stream))))))
;;;###autoload
(defun cl-prin1-to-string (object)
diff --git a/lisp/subr.el b/lisp/subr.el
index d6dceb79fa1..eca8dfdb857 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4536,10 +4536,10 @@ EVALD, FUNC, ARGS, FLAGS are as in `mapbacktrace'."
(princ (if (plist-get flags :debug-on-exit) "* " " "))
(cond
((and evald (not debugger-stack-frame-as-list))
- (prin1 func)
- (if args (prin1 args) (princ "()")))
+ (cl-prin1 func)
+ (if args (cl-prin1 args) (princ "()")))
(t
- (prin1 (cons func args))))
+ (cl-prin1 (cons func args))))
(princ "\n"))
(defun backtrace ()