Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Making a command undoable

9 views
Skip to first unread message

Raffaele Ricciardi

unread,
Aug 31, 2012, 1:16:48 PM8/31/12
to
Hello,

you have written a command and you want to make it undoable by using
`undo'. How do you accomplish that?

Thanks.

Doug Lewan

unread,
Aug 31, 2012, 1:57:30 PM8/31/12
to Raffaele Ricciardi, help-gn...@gnu.org
The elisp info documentation (section 32.9 in emacs 24) tells you what kind of information you have to keep track of and how to do so.

I've also noticed that you very often get "undo" for free if your command make changes in "normal" ways. I assume that "the unit to undo" is a single M-x CMD, but I've never researched this.

,Doug
0 new messages