]> code.delx.au - gnu-emacs/blobdiff - lisp/simple.el
Merged in changes from CVS trunk.
[gnu-emacs] / lisp / simple.el
index 3c9e8c724285a979b4d7929f6833165ae5630fa6..7465e33c8e9a45511ca39963683cc75fbb317cd5 100644 (file)
@@ -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))
 \f
 (defvar shell-command-history nil
   "History list for some commands that read shell commands.")
@@ -2083,6 +2094,8 @@ the text which should be made available.
 The second, optional, argument PUSH, has the same meaning as the
 similar argument to `x-set-cut-buffer', which see.")
 
+(make-variable-frame-local 'interprogram-cut-function)
+
 (defvar interprogram-paste-function nil
   "Function to call to get text cut from other programs.
 
@@ -2103,6 +2116,8 @@ most recent string, the function should return nil.  If it is
 difficult to tell whether Emacs or some other program provided the
 current string, it is probably good enough to return nil if the string
 is equal (according to `string=') to the last text Emacs provided.")
+
+(make-variable-frame-local 'interprogram-paste-function)
 \f