aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman2004-12-21 11:37:52 +0000
committerRichard M. Stallman2004-12-21 11:37:52 +0000
commitb6e8e8e55dba10595b059df3638a85b10c3d3d1f (patch)
treed069f78d548cfa2678d3ea4bef52f49f599f8a49 /lisp
parentd2acc90a44d940a97134dea2a4c9c1a19ccc06da (diff)
downloademacs-b6e8e8e55dba10595b059df3638a85b10c3d3d1f.tar.gz
emacs-b6e8e8e55dba10595b059df3638a85b10c3d3d1f.zip
(undo-outer-limit-truncate): New function.
(undo-outer-limit-function): Use undo-outer-limit-truncate.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 3c9e8c72428..9f1bde393ee 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1484,6 +1484,17 @@ is not *inside* the region START...END."
1484 (t 1484 (t
1485 '(0 . 0))) 1485 '(0 . 0)))
1486 '(0 . 0))) 1486 '(0 . 0)))
1487
1488;; When the first undo batch in an undo list is longer than undo-outer-limit,
1489;; this function gets called to ask the user what to do.
1490;; Garbage collection is inhibited around the call,
1491;; so it had better not do a lot of consing.
1492(setq undo-outer-limit-function 'undo-outer-limit-truncate)
1493(defun undo-outer-limit-truncate (size)
1494 (if (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? "
1495 (buffer-name) size))
1496 (progn (setq buffer-undo-list nil) t)
1497 nil))
1487 1498
1488(defvar shell-command-history nil 1499(defvar shell-command-history nil
1489 "History list for some commands that read shell commands.") 1500 "History list for some commands that read shell commands.")