[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The *Warnings* buffer and undo
From: |
Miles Bader |
Subject: |
Re: The *Warnings* buffer and undo |
Date: |
Sun, 01 Apr 2007 09:44:36 +0900 |
I wrote:
> However in some other potential applications (someone mentioned
> customization buffers, where you probably want to restrict undo to the
> user-editable fields), things are not so simple, so having something
> which works at a primitive level (like "inhibit-undo") might be nice in
> general.
I think I slightly mis-read your message. The method you mention --
looking at buffer-undo-list after the fact, and then removing some
entries and using them to fix up the rest of the entries -- sounds like
a very workable approach in lisp, since the to-be-discarded entries will
contain all the information you need.
A possible interface could be:
(let ((keep-undo buffer-undo-list))
;; do some modifications which shouldn't be kept in the undo list
(do-some-buffer-modifications)
(discard-undo-entries keep-undo))
"discard-undo-entries" would just take a tail of the undo list as an
argument and discard everything before it (fixing up the rest).
-Miles
--
A zen-buddhist walked into a pizza shop and
said, "Make me one with everything."
- Re: The *Warnings* buffer and undo, (continued)
- Re: The *Warnings* buffer and undo, Miles Bader, 2007/03/29
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/30
- Re: The *Warnings* buffer and undo, Glenn Morris, 2007/03/30
- Re: The *Warnings* buffer and undo, Miles Bader, 2007/03/30
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/31
- Re: The *Warnings* buffer and undo, Miles Bader, 2007/03/31
- Re: The *Warnings* buffer and undo,
Miles Bader <=
- Re: The *Warnings* buffer and undo, Richard Stallman, 2007/03/29