>From 860deea4d3ff07c105435ac36c8477fcb6e1d008 Mon Sep 17 00:00:00 2001 From: gazally Date: Sun, 16 Oct 2016 13:34:56 -0700 Subject: [PATCH] Change edebug-max-depth from defconst to defcustom Make edebug-max-depth customizable to give Edebug the ability to instrument code containing very large quoted lists. * lisp/emacs-lisp/edebug.el (edebug-max-depth): Add defcustom. --- lisp/emacs-lisp/edebug.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 6918539..facbda8 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -112,6 +112,18 @@ edebug-eval-macro-args :type 'boolean :group 'edebug) +(defcustom edebug-max-depth 150 + "Maximum recursion depth when instrumenting code. +This limit stops recursion if an Edebug specification contains an +infinite loop. When Edebug is instrumenting code containing very +large quoted lists, it may reach this limit and give the error +message \"Too deep - perhaps infinite loop in spec?\" You can +safely make this limit considerably larger than its default +value, but you may also need to increase `max-lisp-eval-depth' +and `max-specpdl-size'." + :type 'integer + :group 'edebug) + (defcustom edebug-save-windows t "If non-nil, Edebug saves and restores the window configuration. That takes some time, so if your program does not care what happens to @@ -1452,7 +1464,6 @@ edebug-list-form (defvar edebug-after-dotted-spec nil) (defvar edebug-matching-depth 0) ;; initial value -(defconst edebug-max-depth 150) ;; maximum number of matching recursions. ;;; Failure to match -- 2.10.1