emacs-devel
[Top][All Lists]
Advanced

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

Re: A new(?) warning of erase-buffer, which was not seen before.


From: martin rudalics
Subject: Re: A new(?) warning of erase-buffer, which was not seen before.
Date: Fri, 23 Mar 2007 18:35:14 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>>>> My attempted solution was to scan through buffer-undo-list, updating
>>>> those position, every time I inserted some "hidden from undo" text.
>>>> [This isn't typically a performance problem because _usually_
>>>> buffer-undo-list is nil when process output is occuring.]
>>
>>
>>> That's exactly what ERC does.  See erc-update-undo-list.
>>
>>
>> I.e. we should probably add a "insert-without-undo" function which does
>> just that.
>
>
> Yes, please. And also an delete-without-undo.

You can't do that by simply scanning the buffer-undo-list and comparing
positions.  If I recall correctly `erc-update-undo-list' doesn't even
handle the simple case where the undo list records an insertion from A
to B, and you want to insert a text from C to D where A < C and D < B.
It would either modify both A and B or none of them.




reply via email to

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