Variable: undo-outer-limit

undo-outer-limit is a customizable variable defined in undo.c.

Value

nil

Documentation

Outer limit on size of undo information for one command.

At garbage collection time, if the current command has produced more than this much undo information, it discards the info and displays a warning. This is a last-ditch limit to prevent memory overflow.

The size is counted as the number of bytes occupied, which includes both saved text and other data. A value of nil means no limit. In this case, accumulating one huge undo entry could make Emacs crash as a result of memory overflow.

In fact, this calls the function which is the value of undo-outer-limit-function with one argument, the size. The text above describes the behavior of the function that variable usually specifies.

This variable was added, or its default value changed, in Emacs 27.1.

Probably introduced at or before Emacs version 22.1.

Source Code

// Defined in /usr/src/emacs/src/undo.c
  DEFVAR_LISP ("undo-outer-limit", Vundo_outer_limit,
	      doc: /* Outer limit on size of undo information for one command.
At garbage collection time, if the current command has produced
more than this much undo information, it discards the info and displays
a warning.  This is a last-ditch limit to prevent memory overflow.

The size is counted as the number of bytes occupied, which includes
both saved text and other data.  A value of nil means no limit.  In
this case, accumulating one huge undo entry could make Emacs crash as
a result of memory overflow.

In fact, this calls the function which is the value of
`undo-outer-limit-function' with one argument, the size.
The text above describes the behavior of the function
that variable usually specifies.  */);