[Top][All Lists]

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

Re: Text Properties And Buffer Modification

From: martin rudalics
Subject: Re: Text Properties And Buffer Modification
Date: Wed, 05 Dec 2018 10:16:28 +0100

>> (with-silent-modifications
>>    (with-current-buffer other-buffer
>>      (put-text-property beg end 'face 'bold other-buffer)))

I suppose this should be

(with-current-buffer other-buffer
    (put-text-property beg end 'face 'bold other-buffer)))

since otherwise the modified status and 'buffer-undo-list' are taken
from the current buffer instead from 'other-buffer'.

> You could instead simply make the target buffer not modified after you
> are done changing the properties, e.g. by using set-buffer-modified-p.

Which might break in the case where text has been changed in the other
buffer before.


reply via email to

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