help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2 questions about undo-list


From: Andreas Politz
Subject: 2 questions about undo-list
Date: Sat, 24 Jan 2009 18:45:22 +0100
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)


Hello !

1. I want to transparently remove whitespace
from the end of the lines before saving a buffer.
By `transparently' I mean without it disturbing
the undo mechanism.

I tried
(let (buffer-undo-list)
     (replace-regexp ...))

in a before-save-hook, but it _does_ mess up the
undo history. How should I do this ? (Too much to ask ?)

2. self-insert-commands enter the undo-list in packs a 20
chars or so (=> (info "(elisp)Undo") ). Is this kind of
grouping possible for other commands as well ? Kind of
like the opposite of undo-boundary.

Thanks,

-ap




reply via email to

[Prev in Thread] Current Thread [Next in Thread]