# HG changeset patch # User Chong Yidong # Date 1134834355 0 # Node ID 70e76c30ddcc7beef6c90a022d75e81e08800323 # Parent 83c53d29eff4c1ba660031aa6ac2c260373d9cb5 * emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Capture error from printing circular structures. diff -r 83c53d29eff4 -r 70e76c30ddcc lisp/ChangeLog --- a/lisp/ChangeLog Sat Dec 17 15:14:03 2005 +0000 +++ b/lisp/ChangeLog Sat Dec 17 15:45:55 2005 +0000 @@ -1,3 +1,8 @@ +2005-12-17 Chong Yidong + + * emacs-lisp/edebug.el (edebug-safe-prin1-to-string): Capture + error from printing circular structures. + 2005-12-17 Martin Rudalics (tiny change) * wid-edit.el (widget-checkbox-action): Clear undo info. diff -r 83c53d29eff4 -r 70e76c30ddcc lisp/emacs-lisp/edebug.el --- a/lisp/emacs-lisp/edebug.el Sat Dec 17 15:14:03 2005 +0000 +++ b/lisp/emacs-lisp/edebug.el Sat Dec 17 15:45:55 2005 +0000 @@ -3711,7 +3711,9 @@ (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