[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el |
Date: |
Tue, 28 Dec 2004 20:57:58 -0500 |
Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.676 emacs/lisp/simple.el:1.677
*** emacs/lisp/simple.el:1.676 Tue Dec 28 05:11:03 2004
--- emacs/lisp/simple.el Wed Dec 29 01:33:04 2004
***************
*** 1524,1540 ****
'(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 (let (use-dialog-box)
! (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.")
--- 1524,1556 ----
'(0 . 0)))
'(0 . 0)))
+ (defvar undo-extra-outer-limit nil
+ "If non-nil, an extra level of size that's ok in an undo item.
+ We don't ask the user about truncating the undo list until the
+ current item gets bigger than this amount.")
+ (make-variable-buffer-local 'undo-extra-outer-limit)
+
;; 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)
! (when (or (null undo-extra-outer-limit)
! (> size undo-extra-outer-limit))
! ;; Don't ask the question again unless it gets even bigger.
! ;; This applies, in particular, if the user quits from the question.
! ;; Such a quit quits out of GC, but something else will call GC
! ;; again momentarily. It will call this function again,
! ;; but we don't want to ask the question again.
! (setq undo-extra-outer-limit (+ size 50000))
! (if (let (use-dialog-box)
! (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard
it? "
! (buffer-name) size)))
! (progn (setq buffer-undo-list nil)
! (setq undo-extra-outer-limit nil)
! t)
! nil)))
(defvar shell-command-history nil
"History list for some commands that read shell commands.")
***************
*** 3573,3587 ****
(interactive "p")
(forward-word (- (or arg 1))))
! (defun mark-word (&optional arg)
"Set mark ARG words away from point.
The place mark goes is the same place \\[forward-word] would
move to with the same argument.
! If this command is repeated or mark is active in Transient Mark mode,
it marks the next ARG words after the ones already marked."
! (interactive "P")
! (cond ((or (and (eq last-command this-command) (mark t))
! (and transient-mark-mode mark-active))
(setq arg (if arg (prefix-numeric-value arg)
(if (< (mark) (point)) -1 1)))
(set-mark
--- 3589,3605 ----
(interactive "p")
(forward-word (- (or arg 1))))
! (defun mark-word (&optional arg allow-extend)
"Set mark ARG words away from point.
The place mark goes is the same place \\[forward-word] would
move to with the same argument.
! Interactively, if this command is repeated
! or (in Transient Mark mode) if the mark is active,
it marks the next ARG words after the ones already marked."
! (interactive "P\np")
! (cond ((and allow-extend
! (or (and (eq last-command this-command) (mark t))
! (and transient-mark-mode mark-active)))
(setq arg (if arg (prefix-numeric-value arg)
(if (< (mark) (point)) -1 1)))
(set-mark
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Stefan Monnier, 2004/12/03
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Juri Linkov, 2004/12/12
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Juri Linkov, 2004/12/13
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Kim F . Storm, 2004/12/14
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M . Stallman, 2004/12/21
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M . Stallman, 2004/12/27
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M . Stallman, 2004/12/27
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M . Stallman, 2004/12/28
- [Emacs-diffs] Changes to emacs/lisp/simple.el,
Richard M . Stallman <=
- [Emacs-diffs] Changes to emacs/lisp/simple.el, Richard M . Stallman, 2004/12/31