[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with undo and text properties.
From: |
Stefan Monnier |
Subject: |
Re: Problem with undo and text properties. |
Date: |
Mon, 13 Apr 2015 17:23:46 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>> The problem is that those entries shouldn't be there in the first place.
>> Whoever puts them there needs a with-silent-modification.
> 1. M-w puts the string-version-of-the-entire-file (including text
> properties) into the kill ring.
> 2. C-y first appends that string to the buffer, ...
> 3. ... then separately removes the yank-excluded-properties from the
> buffer, creating (nil fontified nil 92222. 92237) in buffer-undo-list in
> so doing.
> The part of C-y that does 3 is remove-yank-excluded-properties.
Hmm... I don't quite understand why removing properties would add
entries like (nil fontified nil 92222 . 92237) which state that the
`fonfified' property was changed *from* nil to something else.
Tho I guess maybe removing a nil property still is considered as
"changing" it.
> I think you're suggesting we put a with-silent-modification around the
> critical bits in remove-yank-excluded-properties. Maybe I'll
> try that.
Hmm... yes, I think with-silent-modification around the last three lines
of remove-yank-excluded-properties would be fine.
Stefan