[Top][All Lists]

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

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

From: Dmitry Gutov
Subject: bug#21391: 24.5; `thing-at-point' should return a string
Date: Thu, 10 Nov 2016 18:19:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0

On 10.11.2016 18:08, Eli Zaretskii wrote:

There's a tension here between consistency and backward compatibility.
And since this function was "inconsistent" for a very long time, I'm
not sure losing backward compatibility can be justified by consistency
at this point.

I believe I've touched on this already.

And another inconsistency:

(bounds-of-thing-at-point 'number) always returns nil.

We'd also lose something else: some Lisp objects can be printed, but
their printed representation cannot be read back.  So for some
objects, requiring thing-at-point to return a string would lose

We won't lose that if we go with either of my proposals: instead of printing objects inside the thing-at-point function, we would require that each returned thing is a string already. Any thing-at-point function that returns a non-string will be considered non-conformant.

reply via email to

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