unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: `max-specpdl-size' and `max-lisp-eval-depth'
Date: Sun, 26 Sep 2021 09:13:51 +0200	[thread overview]
Message-ID: <20210926071351.GA10016@tuxteam.de> (raw)
In-Reply-To: <CAGP6POLjYrjgwEH2-FUFLEPGj_H9ju76PMQhU5d3DJj6REyx9Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

On Sun, Sep 26, 2021 at 02:33:51PM +0800, Hongyi Zhao wrote:

[...]

> What's the meaning of `specpdl'?

Ask Emacs. Go to the Emacs Lisp info (in an Emacs windows, do C-h i
and m "Elisp" or whatever equivalent there is in your operating
system).

Then enter "i" (means "index") and then "specpdl". The first hit
will tell you:

 -- User Option: max-specpdl-size
     This variable defines the limit on the total number of local
     variable bindings and ‘unwind-protect’ cleanups (see *note Cleaning
     Up from Nonlocal Exits: Cleanups.) that are allowed before Emacs
     signals an error (with data ‘"Variable binding depth exceeds
     max-specpdl-size"’).

     This limit, with the associated error when it is exceeded, is one
     way that Lisp avoids infinite recursion on an ill-defined function.
     ‘max-lisp-eval-depth’ provides another limit on depth of nesting.
     *Note Eval: Definition of max-lisp-eval-depth.

     The default value is 1600.  Entry to the Lisp debugger increases
     the value, if there is little room left, to make sure the debugger
     itself has room to execute.

So that is a kind of stack, but not for "normal" function returns,
but rather for unwind-protects and other nonlocal exit paths.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2021-09-26  7:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26  1:48 `max-specpdl-size' and `max-lisp-eval-depth' Hongyi Zhao
2021-09-26  2:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26  6:33   ` Hongyi Zhao
2021-09-26  7:13     ` tomas [this message]
2021-09-26 11:26       ` Hongyi Zhao
2021-09-26 11:55         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26 13:04         ` Eli Zaretskii
2021-09-26 15:01           ` Hongyi Zhao
2021-09-28 10:50             ` Stephen Berman
2021-09-28 11:03               ` Hongyi Zhao
2021-09-28 11:05               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28 11:20                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28 13:49                 ` tomas
2021-09-28 14:08                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28 14:19                     ` tomas
2021-09-28 11:14               ` Lars Ingebrigtsen
2021-09-28 11:23                 ` Stephen Berman
2021-09-29  5:53                   ` Lars Ingebrigtsen
2021-09-26  3:53 ` [External] : " Drew Adams
2021-09-26  4:09   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28  3:45     ` Google vi (was: Re: [External] : `max-specpdl-size' and `max-lisp-eval-depth') Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26  7:09   ` [External] : `max-specpdl-size' and `max-lisp-eval-depth' Hongyi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210926071351.GA10016@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).