Subject: bug#13743: 24.2.93; Segmentation fault when trying to [s]teal a file opened elsewhere

From: Stefan Monnier <[email-masked]>
Date: Mon, 25 Feb 2013 10:25:15 -0500

>> The manifestation of the problem will be that modify_region will be
>> called in this case, although we don't actually modify anything.  You
>> will probably see the "modified" indicator on the mode line, something
>> that shouldn't have happened.
> That is indeed what happens.
> OTOH, the existing behavior in this area is rather messy anyway:

Not only that, but it's not clear why "that shouldn't have happened".
It's good to optimize away the whole add-text-properties when it ends up
doing nothing, but it's just an optimization.

And I don't think it's an important one here, since (as Dmitry points
out) the likely most common case (of having `start' be right at the
beginning of an interval object) didn't work anyway, and furthermore
most calls to add-text-properties are likely to be protected by
inhibit-modification-hooks.

        Stefan