C-h v max-lisp-eval-depth
:
You can safely make it considerably larger than its default value, if that proves inconveniently small.
Yes, I want it to be as large as possible.
However, the docstring also says:
However, if you increase it too far, Emacs could overflow the real C stack, and crash.
I want to set it to a large enough but safe value.
How do I know this value?
If it needs to dive into C code, then simply recommend a estimated value that is absolutely safe and reasonably large.
max-specpdl-size
has been made obsolete. Its doc string says:This variable is obsolete since 29.1. Former limit on specbindings, now without effect. This variable used to limit the size of the specpdl stack which, among other things, holds dynamic variable bindings and ‘unwind-protect’ activations. To prevent runaway recursion, use ‘max-lisp-eval-depth’ instead; it will indirectly limit the specpdl stack size as well.