emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 92ca51c: * lisp/subr.el (backtrace--print-frame): U


From: Stefan Monnier
Subject: [Emacs-diffs] master 92ca51c: * lisp/subr.el (backtrace--print-frame): Use cl-prin1
Date: Tue, 12 Dec 2017 22:40:57 -0500 (EST)

branch: master
commit 92ca51cc5e9d30818f5abf60a5a13f08f2ea7e96
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * 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.
---
 lisp/emacs-lisp/cl-print.el | 13 +++++++------
 lisp/subr.el                |  6 +++---
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el
index 4fc178c..5a26ecf 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 d6dceb7..eca8dfd 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 ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]