]> code.delx.au - gnu-emacs/commitdiff
* emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Capture
authorChong Yidong <cyd@stupidchicken.com>
Sat, 17 Dec 2005 15:45:55 +0000 (15:45 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 17 Dec 2005 15:45:55 +0000 (15:45 +0000)
error from printing circular structures.

lisp/ChangeLog
lisp/emacs-lisp/edebug.el

index 20369d7a331a1124d9aa8fb0050f92e0fb0339c4..65961284484aad36773c69cc3268c4ad295b878b 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-17  Chong Yidong  <cyd@stupidchicken.com>
+
+       * emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Capture
+       error from printing circular structures.
+
 2005-12-17  Martin Rudalics  <rudalics@gmx.at>  (tiny change)
 
        * wid-edit.el (widget-checkbox-action): Clear undo info.
index 01f1d76010931f17a5c69e80a32ba0c38d6daf23..9290ede2bdfa034a9770313b4b734368186b18fa 100644 (file)
@@ -3711,7 +3711,9 @@ Return the result of the last expression."
        (print-level (or edebug-print-level print-level))
        (print-circle (or edebug-print-circle print-circle))
        (print-readably nil)) ;; lemacs uses this.
-    (edebug-prin1-to-string value)))
+    (condition-case nil
+       (edebug-prin1-to-string value)
+      (error "#Apparently circular structure#"))))
 
 (defun edebug-compute-previous-result (edebug-previous-value)
   (if edebug-unwrap-results