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

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

Re: Undo manipulation


From: Kevin Rodgers
Subject: Re: Undo manipulation
Date: Mon, 18 Aug 2003 10:42:20 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Bill Wohler wrote:

Kevin Rodgers <ihs_4664@yahoo.com> writes:
(let ((buffer-undo-list t))
  (insert "xyz\n"))


Cool, thanks.

However, I was not pleased with the results in my case since the
ignored manipulations occurred near the top and near the bottom of the
buffer. So subsequent undos were very confused.

Here's a little more info. We have a radio button menu item that
performs these actions I've described. Currently, the undo will undo
the action stepwise, but the radio button will no longer represent
reality. Ideally, an undo would undo the entire set of actions in one
swoop, and set the radio button back to its previous setting. Is this
possible?


I don't knw -- isn't that what the undo-boundary function is for?


Otherwise, would it be better or worse for us to set buffer-undo-list
to nil to prevent the radio button from getting out of sync?

I think that would cause the changes to be recorded, but only in the

temporary buffer-undo-list binding, which would be lost when the
let form returns.

--
Kevin Rodgers



reply via email to

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