Variable: undo-ask-before-discard

undo-ask-before-discard is a customizable variable defined in simple.el.gz.

Value

nil

Documentation

If non-nil ask about discarding undo info for the current command.

Normally, Emacs discards the undo info for the current command if it exceeds undo-outer-limit. But if you set this option non-nil, it asks in the echo area whether to discard the info. If you answer no, there is a slight risk that Emacs might crash, so do it only if you really want to undo the command.

This option is mainly intended for debugging. You have to be careful if you use it for other purposes. Garbage collection is inhibited while the question is asked, meaning that Emacs might leak memory. So you should make sure that you do not wait excessively long before answering the question.

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

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defcustom undo-ask-before-discard nil
  "If non-nil ask about discarding undo info for the current command.
Normally, Emacs discards the undo info for the current command if
it exceeds `undo-outer-limit'.  But if you set this option
non-nil, it asks in the echo area whether to discard the info.
If you answer no, there is a slight risk that Emacs might crash, so
do it only if you really want to undo the command.

This option is mainly intended for debugging.  You have to be
careful if you use it for other purposes.  Garbage collection is
inhibited while the question is asked, meaning that Emacs might
leak memory.  So you should make sure that you do not wait
excessively long before answering the question."
  :type 'boolean
  :group 'undo
  :version "22.1")