[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Emacs hangs while edebugging recentf.el]
From: |
Chong Yidong |
Subject: |
Re: address@hidden: Emacs hangs while edebugging recentf.el] |
Date: |
Fri, 16 Dec 2005 10:35:25 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
martin rudalics <address@hidden> writes:
> > It works for me, at least using the recipe given in the original
> > email. What steps are you using?
>
> `edebug-defun' on `widget-field-find' and customizing some arbitrary
> editable field. And `edebug-print-level' equalling 50. My (Windows ME)
> swap area quickly grew from its usual 70MB to nearly 500MB before I was
> able to kill Emacs.
OK, I guess that hack was not good enough to cover all situations.
Try this one; it should be pretty much bulletproof.
*** emacs/src/print.c.~1.215.~ 2005-12-15 19:09:36.000000000 -0500
--- emacs/src/print.c 2005-12-16 10:20:17.000000000 -0500
***************
*** 1313,1326 ****
/* Give up if we go so deep that print_object will get an error. */
/* See similar code in print_object. */
! /* Because print_preprocess "follows" nested lists in a slightly
! different order from print_object, there is a risk of giving up
! too soon. In that case, a deeply nested circular list may cause
! print_object to loop. Using 3 * PRINT_CIRCLE should make this
! possibility negligible, but at some point someone will have to
! sit down and do a more careful analysis. -- cyd */
! if (print_depth >= 3 * PRINT_CIRCLE)
! return;
/* Avoid infinite recursion for circular nested structure
in the case where Vprint_circle is nil. */
--- 1313,1320 ----
/* Give up if we go so deep that print_object will get an error. */
/* See similar code in print_object. */
! if (print_depth >= PRINT_CIRCLE)
! error ("Apparently circular structure being printed");
/* Avoid infinite recursion for circular nested structure
in the case where Vprint_circle is nil. */
*** emacs/lisp/emacs-lisp/edebug.el.~3.84.~ 2005-12-13 21:38:03.000000000
-0500
--- emacs/lisp/emacs-lisp/edebug.el 2005-12-16 10:29:59.000000000 -0500
***************
*** 3711,3717 ****
(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)))
(defun edebug-compute-previous-result (edebug-previous-value)
(if edebug-unwrap-results
--- 3711,3719 ----
(print-level (or edebug-print-level print-level))
(print-circle (or edebug-print-circle print-circle))
(print-readably nil)) ;; lemacs uses this.
! (condition-case nil
! (edebug-prin1-to-string value)
! (error "# Circular or too deeply-nested structure #"))))
(defun edebug-compute-previous-result (edebug-previous-value)
(if edebug-unwrap-results