* undo boundaries
@ 2008-03-15 11:39 Nikolaj Schumacher
0 siblings, 0 replies; 3+ messages in thread
From: Nikolaj Schumacher @ 2008-03-15 11:39 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I'm trying to use undo boundaries, but I'm unable to explain its
behavior.
For example:
(defun test ()
(interactive)
(insert "a")
(undo-boundary)
(insert "b"))
If I do M-x test, I get:
ab
^
But if I undo once, I get:
a
^
What I was expecting:
a
^
Is this a bug or is there a reason for this behavior?
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: undo boundaries
[not found] <mailman.8949.1205581280.18990.help-gnu-emacs@gnu.org>
@ 2008-03-15 12:25 ` Johan Bockgård
2008-03-15 13:19 ` Johan Bockgård
0 siblings, 1 reply; 3+ messages in thread
From: Johan Bockgård @ 2008-03-15 12:25 UTC (permalink / raw)
To: help-gnu-emacs
Nikolaj Schumacher <n_schumacher@web.de> writes:
> I'm trying to use undo boundaries, but I'm unable to explain its
> behavior.
>
> For example:
>
> (defun test ()
> (interactive)
> (insert "a")
> (undo-boundary)
> (insert "b"))
>
> If I do M-x test, I get:
> ab
> ^
>
> But if I undo once, I get:
> a
> ^
>
> What I was expecting:
> a
> ^
>
> Is this a bug or is there a reason for this behavior?
A bug, IMO. Emacs 21 does what you expect.
--
Johan Bockgård
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: undo boundaries
2008-03-15 12:25 ` Johan Bockgård
@ 2008-03-15 13:19 ` Johan Bockgård
0 siblings, 0 replies; 3+ messages in thread
From: Johan Bockgård @ 2008-03-15 13:19 UTC (permalink / raw)
To: emacs-devel; +Cc: help-gnu-emacs
The likely suspect is this change:
undo.c
revision 1.55
date: 2002-04-04 22:42:56 +0200; author: monnier;
(record_point): New fun.
(record_delete, record_insert): Use it.
bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
> Nikolaj Schumacher <n_schumacher@web.de> writes:
>
>> I'm trying to use undo boundaries, but I'm unable to explain its
>> behavior.
>>
>> For example:
>>
>> (defun test ()
>> (interactive)
>> (insert "a")
>> (undo-boundary)
>> (insert "b"))
>>
>> If I do M-x test, I get:
>> ab
>> ^
>>
>> But if I undo once, I get:
>> a
>> ^
>>
>> What I was expecting:
>> a
>> ^
>>
>> Is this a bug or is there a reason for this behavior?
>
> A bug, IMO. Emacs 21 does what you expect.
--
Johan Bockgård
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-15 13:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-15 11:39 undo boundaries Nikolaj Schumacher
[not found] <mailman.8949.1205581280.18990.help-gnu-emacs@gnu.org>
2008-03-15 12:25 ` Johan Bockgård
2008-03-15 13:19 ` Johan Bockgård
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).