Commit b6e8e8e5 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(undo-outer-limit-truncate): New function.

(undo-outer-limit-function): Use undo-outer-limit-truncate.
parent d2acc90a
......@@ -1484,6 +1484,17 @@ is not *inside* the region START...END."
(t
'(0 . 0)))
'(0 . 0)))
;; When the first undo batch in an undo list is longer than undo-outer-limit,
;; this function gets called to ask the user what to do.
;; Garbage collection is inhibited around the call,
;; so it had better not do a lot of consing.
(setq undo-outer-limit-function 'undo-outer-limit-truncate)
(defun undo-outer-limit-truncate (size)
(if (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
(buffer-name) size))
(progn (setq buffer-undo-list nil) t)
nil))
(defvar shell-command-history nil
"History list for some commands that read shell commands.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment