aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2017-12-12 22:40:27 -0500
committerStefan Monnier2017-12-12 22:40:27 -0500
commit92ca51cc5e9d30818f5abf60a5a13f08f2ea7e96 (patch)
treea3ae7961ed0821184862dc65a2f0589e53975f93
parent8c91d31beab0234e8a187864df46af543022c656 (diff)
downloademacs-92ca51cc5e9d30818f5abf60a5a13f08f2ea7e96.tar.gz
emacs-92ca51cc5e9d30818f5abf60a5a13f08f2ea7e96.zip
* lisp/subr.el (backtrace--print-frame): Use cl-prin1
* lisp/emacs-lisp/cl-print.el (cl-prin1): Catch errors, since callers generally don't expect errors.
-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
269`cl-print-readably', `cl-print-compiled', along with output 269`cl-print-readably', `cl-print-compiled', along with output
270variables for the standard printing functions. See Info 270variables for the standard printing functions. See Info
271node `(elisp)Output Variables'." 271node `(elisp)Output Variables'."
272 (cond 272 (if cl-print-readably
273 (cl-print-readably (prin1 object stream)) 273 (prin1 object stream)
274 ((not print-circle) (cl-print-object object stream)) 274 (with-demoted-errors "cl-prin1: %S"
275 (t 275 (if (not print-circle)
276 (let ((cl-print--number-table (cl-print--preprocess object))) 276 (cl-print-object object stream)
277 (cl-print-object object stream))))) 277 (let ((cl-print--number-table (cl-print--preprocess object)))
278 (cl-print-object object stream))))))
278 279
279;;;###autoload 280;;;###autoload
280(defun cl-prin1-to-string (object) 281(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'."
4536 (princ (if (plist-get flags :debug-on-exit) "* " " ")) 4536 (princ (if (plist-get flags :debug-on-exit) "* " " "))
4537 (cond 4537 (cond
4538 ((and evald (not debugger-stack-frame-as-list)) 4538 ((and evald (not debugger-stack-frame-as-list))
4539 (prin1 func) 4539 (cl-prin1 func)
4540 (if args (prin1 args) (princ "()"))) 4540 (if args (cl-prin1 args) (princ "()")))
4541 (t 4541 (t
4542 (prin1 (cons func args)))) 4542 (cl-prin1 (cons func args))))
4543 (princ "\n")) 4543 (princ "\n"))
4544 4544
4545(defun backtrace () 4545(defun backtrace ()