aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGemini Lasswell2017-02-04 12:56:19 +0200
committerEli Zaretskii2017-02-04 12:56:19 +0200
commit78f841d6db77f8b72d6d7d221af26efb956ab6cb (patch)
treefce319434b2f653816cf18d1a25cdf6808e9dcc2
parentc71b718be86bdda7b51c8ea0da30aa896a7833fe (diff)
downloademacs-78f841d6db77f8b72d6d7d221af26efb956ab6cb.tar.gz
emacs-78f841d6db77f8b72d6d7d221af26efb956ab6cb.zip
Change edebug-max-depth from defconst to defcustom
* lisp/emacs-lisp/edebug.el (edebug-max-depth): Add defcustom. (Bug#24713) * etc/NEWS: Mention edebug-max-depth. * doc/lispref/edebug.texi (Checking Whether to Stop): Mention edebug-max-depth and index it. Add cross-references for max-lisp-eval-depth and max-specpdl-size. Co-authored-by: Eli Zaretskii <eliz@gnu.org>
-rw-r--r--doc/lispref/edebug.texi10
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/emacs-lisp/edebug.el13
3 files changed, 24 insertions, 4 deletions
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index f6f73ea8947..da72c9b700c 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -979,9 +979,13 @@ program.
979 979
980@itemize @bullet 980@itemize @bullet
981@item 981@item
982@code{max-lisp-eval-depth} and @code{max-specpdl-size} are both 982@vindex edebug-max-depth
983increased to reduce Edebug's impact on the stack. You could, however, 983@code{max-lisp-eval-depth} (@pxref{Eval}) and @code{max-specpdl-size}
984still run out of stack space when using Edebug. 984(@pxref{Local Variables}) are both increased to reduce Edebug's impact
985on the stack. You could, however, still run out of stack space when
986using Edebug. You can also enlarge the value of
987@code{edebug-max-depth} if Edebug reaches the limit of recursion depth
988instrumenting code that contains very large quoted lists.
985 989
986@item 990@item
987The state of keyboard macro execution is saved and restored. While 991The state of keyboard macro execution is saved and restored. While
diff --git a/etc/NEWS b/etc/NEWS
index 270f8803d53..cbf2b70c821 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -464,6 +464,11 @@ viewing HTML files and the like.
464breakpoint (e.g. with "f" and "o") by customizing the new option 464breakpoint (e.g. with "f" and "o") by customizing the new option
465'edebug-sit-on-break'. 465'edebug-sit-on-break'.
466 466
467+++
468*** New customizable option 'edebug-max-depth'
469This allows to enlarge the maximum recursion depth when instrumenting
470code.
471
467** Eshell 472** Eshell
468 473
469*** 'eshell-input-filter's value is now a named function 474*** 'eshell-input-filter's value is now a named function
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index db54d1eeb20..ec0f08de356 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -112,6 +112,18 @@ and some not, use `def-edebug-spec' to specify an `edebug-form-spec'."
112 :type 'boolean 112 :type 'boolean
113 :group 'edebug) 113 :group 'edebug)
114 114
115(defcustom edebug-max-depth 150
116 "Maximum recursion depth when instrumenting code.
117This limit is intended to stop recursion if an Edebug specification
118contains an infinite loop. When Edebug is instrumenting code
119containing very large quoted lists, it may reach this limit and give
120the error message \"Too deep - perhaps infinite loop in spec?\".
121Make this limit larger to countermand that, but you may also need to
122increase `max-lisp-eval-depth' and `max-specpdl-size'."
123 :type 'integer
124 :group 'edebug
125 :version "26.1")
126
115(defcustom edebug-save-windows t 127(defcustom edebug-save-windows t
116 "If non-nil, Edebug saves and restores the window configuration. 128 "If non-nil, Edebug saves and restores the window configuration.
117That takes some time, so if your program does not care what happens to 129That takes some time, so if your program does not care what happens to
@@ -1452,7 +1464,6 @@ expressions; a `progn' form will be returned enclosing these forms."
1452(defvar edebug-after-dotted-spec nil) 1464(defvar edebug-after-dotted-spec nil)
1453 1465
1454(defvar edebug-matching-depth 0) ;; initial value 1466(defvar edebug-matching-depth 0) ;; initial value
1455(defconst edebug-max-depth 150) ;; maximum number of matching recursions.
1456 1467
1457 1468
1458;;; Failure to match 1469;;; Failure to match