From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: undo in loaddefs.el buffer Date: Wed, 29 Dec 2004 13:59:10 +0100 Message-ID: <6EB9C240-5999-11D9-B902-000D93505B76@swipnet.se> References: <200412211414.iBLEEZ903426@raven.dms.auburn.edu> <200412211541.iBLFfBc03861@raven.dms.auburn.edu> <87llbonyup.fsf@jurta.org> <200412260206.iBQ26wG17970@raven.dms.auburn.edu> <41CEE3B8.9090600@swipnet.se> <200412270231.iBR2VDE19709@raven.dms.auburn.edu> <41CFE247.8090409@swipnet.se> <41D15CBE.8060105@swipnet.se> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1104325319 29189 80.91.229.6 (29 Dec 2004 13:01:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Dec 2004 13:01:59 +0000 (UTC) Cc: juri@jurta.org, yamaoka@jpl.org, teirllm@dms.auburn.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 29 14:01:52 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CjdSZ-0007Oi-00 for ; Wed, 29 Dec 2004 14:01:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CjddT-0001BK-GH for ged-emacs-devel@m.gmane.org; Wed, 29 Dec 2004 08:13:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cjdcm-0000x9-5U for emacs-devel@gnu.org; Wed, 29 Dec 2004 08:12:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cjdck-0000vu-5N for emacs-devel@gnu.org; Wed, 29 Dec 2004 08:12:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cjdck-0000vq-2n for emacs-devel@gnu.org; Wed, 29 Dec 2004 08:12:22 -0500 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CjdQx-0008Ku-Oz; Wed, 29 Dec 2004 08:00:12 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20041229130002.IRYX6820.mxfep02.bredband.com@coolsville.localdomain>; Wed, 29 Dec 2004 14:00:02 +0100 In-Reply-To: Original-To: rms@gnu.org X-Mailer: Apple Mail (2.619) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:31574 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31574 > Now I understand the problem. Does this fix it? Yes it does. Jan D. > > *** simple.el 27 Dec 2004 20:52:25 -0500 1.676 > --- simple.el 28 Dec 2004 13:49:15 -0500=09 > *************** > *** 1524,1540 **** > '(0 . 0))) > '(0 . 0))) > > ;; When the first undo batch in an undo list is longer than=20 > 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=20 > it? " > ! (buffer-name) size))) > ! (progn (setq buffer-undo-list nil) t) > ! nil)) > =0C > (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=20 > 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=20 > 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;=20 > discard it? " > ! (buffer-name) size))) > ! (progn (setq buffer-undo-list nil) > ! (setq undo-extra-outer-limit nil) > ! t) > ! nil))) > =0C > (defvar shell-command-history nil > "History list for some commands that read shell commands.") > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel