max-specpdl-size

max-specpdl-size is a variable defined in `C source code'.
Its value is
1300

  • This variable may be risky if used as a file-local variable.

Documentation:
Limit on number of Lisp variable bindings and `unwind-protect's.
If Lisp code tries to increase the total number past this amount,
an error is signaled.
You can safely use a value considerably larger than the default value,
if that proves inconveniently small. However, if you increase it too far,
Emacs could run out of memory trying to make the stack bigger.
Note that this limit may be silently increased by the debugger
if `debug-on-error' or `debug-on-quit' is set.

You can customize this variable.