all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
Cc: juri@jurta.org, yamaoka@jpl.org, teirllm@dms.auburn.edu,
	emacs-devel@gnu.org
Subject: Re: undo in loaddefs.el buffer
Date: Wed, 29 Dec 2004 13:59:10 +0100	[thread overview]
Message-ID: <6EB9C240-5999-11D9-B902-000D93505B76@swipnet.se> (raw)
In-Reply-To: <E1CjOPf-0005uL-FI@fencepost.gnu.org>


> 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	
> ***************
> *** 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))
>   \f
>   (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)))
>   \f
>   (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

  reply	other threads:[~2004-12-29 12:59 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-21 14:14 undo in loaddefs.el buffer Luc Teirlinck
2004-12-21 15:41 ` Luc Teirlinck
2004-12-22  4:31   ` Katsumi Yamaoka
2004-12-22  4:58     ` Katsumi Yamaoka
2004-12-23  0:01     ` Richard Stallman
2004-12-23  0:26       ` David Kastrup
2004-12-25 15:13         ` Richard Stallman
2004-12-24  1:45     ` Juri Linkov
2004-12-24 21:39       ` Luc Teirlinck
2004-12-26  9:14         ` Richard Stallman
2004-12-27  5:29           ` Luc Teirlinck
2004-12-27 22:35             ` Richard Stallman
2004-12-24 23:59       ` Luc Teirlinck
2004-12-25 15:12       ` Richard Stallman
2004-12-26  2:06         ` Luc Teirlinck
2004-12-26  2:32           ` Juri Linkov
2004-12-26  3:59             ` Luc Teirlinck
2004-12-27  2:40             ` Luc Teirlinck
2004-12-27 20:16               ` Juri Linkov
2004-12-28  4:57                 ` Richard Stallman
2004-12-27  4:09             ` Richard Stallman
2004-12-26 16:15           ` Jan D.
2004-12-27  2:31             ` Luc Teirlinck
2004-12-27 10:21               ` Jan D.
2004-12-27 11:05                 ` Jan D.
2004-12-27 22:35                 ` Richard Stallman
2004-12-28 13:16                   ` Jan D.
2004-12-28 20:57                     ` Richard Stallman
2004-12-29 12:59                       ` Jan D. [this message]
2004-12-28  5:03                 ` Luc Teirlinck
2004-12-28 17:25                   ` Richard Stallman
2004-12-29  2:07                     ` Luc Teirlinck
2004-12-29 20:46                       ` Richard Stallman
2004-12-30  1:14                         ` Luc Teirlinck
2004-12-30 16:43                           ` Richard Stallman
2004-12-31  1:54                             ` Luc Teirlinck
2004-12-31  9:22                               ` David Kastrup
2004-12-31 15:04                                 ` Luc Teirlinck
2005-01-01  5:25                                   ` Richard Stallman
2005-01-02 16:02                                     ` Luc Teirlinck
2005-01-03  0:58                                       ` Richard Stallman
2005-01-04  3:07                                         ` Luc Teirlinck
2005-01-04 17:00                                           ` Richard Stallman
2004-12-31  2:14                             ` Luc Teirlinck
2004-12-30  5:06                     ` Luc Teirlinck
2004-12-30 20:58                       ` Richard Stallman
2004-12-27 18:05             ` Richard Stallman
2004-12-27 19:33               ` Jan D.
2004-12-28  4:57                 ` Richard Stallman
2004-12-28  8:11                   ` Jan D.
2004-12-28 21:05                 ` Jason Rumney
2004-12-29 23:22                   ` Jan D.
2004-12-27  4:09           ` Richard Stallman
2004-12-27  4:42             ` Luc Teirlinck
2004-12-26  2:43         ` Juri Linkov
2004-12-27  4:09           ` Richard Stallman
2005-01-04  9:05     ` Juri Linkov
2004-12-21 21:57 ` Kevin Rodgers
2004-12-22  0:17   ` Luc Teirlinck
2004-12-22  0:17 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6EB9C240-5999-11D9-B902-000D93505B76@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=teirllm@dms.auburn.edu \
    --cc=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.