diff options
| author | Gemini Lasswell | 2017-02-04 12:56:19 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-02-04 12:56:19 +0200 |
| commit | 78f841d6db77f8b72d6d7d221af26efb956ab6cb (patch) | |
| tree | fce319434b2f653816cf18d1a25cdf6808e9dcc2 | |
| parent | c71b718be86bdda7b51c8ea0da30aa896a7833fe (diff) | |
| download | emacs-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.texi | 10 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 13 |
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 |
| 983 | increased to reduce Edebug's impact on the stack. You could, however, | 983 | @code{max-lisp-eval-depth} (@pxref{Eval}) and @code{max-specpdl-size} |
| 984 | still run out of stack space when using Edebug. | 984 | (@pxref{Local Variables}) are both increased to reduce Edebug's impact |
| 985 | on the stack. You could, however, still run out of stack space when | ||
| 986 | using Edebug. You can also enlarge the value of | ||
| 987 | @code{edebug-max-depth} if Edebug reaches the limit of recursion depth | ||
| 988 | instrumenting code that contains very large quoted lists. | ||
| 985 | 989 | ||
| 986 | @item | 990 | @item |
| 987 | The state of keyboard macro execution is saved and restored. While | 991 | The state of keyboard macro execution is saved and restored. While |
| @@ -464,6 +464,11 @@ viewing HTML files and the like. | |||
| 464 | breakpoint (e.g. with "f" and "o") by customizing the new option | 464 | breakpoint (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' | ||
| 469 | This allows to enlarge the maximum recursion depth when instrumenting | ||
| 470 | code. | ||
| 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. | ||
| 117 | This limit is intended to stop recursion if an Edebug specification | ||
| 118 | contains an infinite loop. When Edebug is instrumenting code | ||
| 119 | containing very large quoted lists, it may reach this limit and give | ||
| 120 | the error message \"Too deep - perhaps infinite loop in spec?\". | ||
| 121 | Make this limit larger to countermand that, but you may also need to | ||
| 122 | increase `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. |
| 117 | That takes some time, so if your program does not care what happens to | 129 | That 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 |