emacs-devel
[Top][All Lists]
Advanced

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

Re: buffer-swap-text


From: Stefan Monnier
Subject: Re: buffer-swap-text
Date: Fri, 24 Oct 2008 00:05:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>     I don't see any benefit to hardcode this in buffer-swap-text.
>     We may very well rename buffer-swap-text to buffer-swap-text-internal
>     and introduce a new buffer-swap-text which can perform such things
>     (probably using write-region-annotation-function), as well as swap
>     variables like buffer-file-coding-system.

> That would be ok, I suppose, but one advantage of doing it in C
> is that there is no chance anything can cause it to swap
> the text without swapping the rest.

It is not necessary to swap the rest at the same time.
More specifically, it will not cause any inconsistency or crash.

Now, maybe in all practical cases swapping those other things will be
necessary to provide the desired behavior, but there may just as well be
uses of buffer-swap-text where swapping those other variables is not
needed or undesirable.


        Stefan




reply via email to

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