Subject: bug#21391: 24.5; `thing-at-point' should return a string

From: Eli Zaretskii <[email-masked]>
Date: Mon, 07 Nov 2016 20:04:22 +0200

> Date: Mon, 7 Nov 2016 08:10:34 -0800 (PST)
> From: Drew Adams <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> What is new (since Emacs 24.4) is that someone added this at the end
> of the definition of `thing-at-point', and made it pertain to _both_
> branches of the `if'.  In addition, they named the result of the `if'
> by the variable `text'.
> 
> (when (and text no-properties)
>   (set-text-properties 0 (length text) nil text))
> 
> They apparently paid no attention to the important `thing-at-point'
> behavior provided by the first `if' clause, and instead just assumed
> that the `if' always returned a string.

This is already fixed in the current sources.  We now only remove the
text properties if the object supports that.  Why isn't that enough?