diff options
| author | Gemini Lasswell | 2018-06-20 13:58:33 -0700 |
|---|---|---|
| committer | Gemini Lasswell | 2018-06-30 07:36:11 -0700 |
| commit | 4bd43b03526ae893609c7b54958fc332a1c81681 (patch) | |
| tree | 9baac307550a99d7b7a9a48442deca5e515c9f0b | |
| parent | ab983522a140187fa2f7bd996c6e3760b0db8d09 (diff) | |
| download | emacs-4bd43b03526ae893609c7b54958fc332a1c81681.tar.gz emacs-4bd43b03526ae893609c7b54958fc332a1c81681.zip | |
Increase max-lisp-eval-depth adjustment while in debugger (bug#31919)
* src/eval.c (call_debugger): Increase the amount of extra Lisp
evaluation depth given to the debugger to allow it to call cl-print.
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Add a comment
to suggest updating call_debugger when changing print-level.
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 1 | ||||
| -rw-r--r-- | src/eval.c | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 593fab97275..821d6748821 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -322,6 +322,7 @@ That buffer should be current already." | |||
| 322 | (backtrace-frames 'debug))) | 322 | (backtrace-frames 'debug))) |
| 323 | (print-escape-newlines t) | 323 | (print-escape-newlines t) |
| 324 | (print-escape-control-characters t) | 324 | (print-escape-control-characters t) |
| 325 | ;; If you increase print-level, add more depth in call_debugger. | ||
| 325 | (print-level 8) | 326 | (print-level 8) |
| 326 | (print-length 50) | 327 | (print-length 50) |
| 327 | (pos (point))) | 328 | (pos (point))) |
diff --git a/src/eval.c b/src/eval.c index ca1eb84ff3f..40cba3bb1ce 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -282,8 +282,12 @@ call_debugger (Lisp_Object arg) | |||
| 282 | /* Do not allow max_specpdl_size less than actual depth (Bug#16603). */ | 282 | /* Do not allow max_specpdl_size less than actual depth (Bug#16603). */ |
| 283 | EMACS_INT old_max = max (max_specpdl_size, count); | 283 | EMACS_INT old_max = max (max_specpdl_size, count); |
| 284 | 284 | ||
| 285 | if (lisp_eval_depth + 40 > max_lisp_eval_depth) | 285 | /* The previous value of 40 is too small now that the debugger |
| 286 | max_lisp_eval_depth = lisp_eval_depth + 40; | 286 | prints using cl-prin1 instead of prin1. Printing lists nested 8 |
| 287 | deep (which is the value of print-level used in the debugger) | ||
| 288 | currently requires 77 additional frames. See bug#31919. */ | ||
| 289 | if (lisp_eval_depth + 100 > max_lisp_eval_depth) | ||
| 290 | max_lisp_eval_depth = lisp_eval_depth + 100; | ||
| 287 | 291 | ||
| 288 | /* While debugging Bug#16603, previous value of 100 was found | 292 | /* While debugging Bug#16603, previous value of 100 was found |
| 289 | too small to avoid specpdl overflow in the debugger itself. */ | 293 | too small to avoid specpdl overflow in the debugger itself. */ |