Subject: RE: bug#8667: 24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment'

From: "Drew Adams" <[email-masked]>
Date: Fri, 13 May 2011 10:18:47 -0700

> >> I think `forward-whitespace' is incorrect
> 
> The current behavior is clearly intentional (the 
> (skip-chars-backward " \t") shows that the function wants
> to treat newlines as not-just-whitespace).
> So I'd rather not change it.

OK, but the name is not suggestive of what it does, and there is no doc to tell
users what it does.

Also, who really cares what the original intention was in this case (what "the
funciton wants" to do), since it is not even used (in the Emacs sources)?

There has been plenty of incomplete, incorrect, and bad-intentioned or badly
designed code in thingatpt.el, since the beginning.  I don't see this particular
original intention as holy.  But I'm OK with leaving it as is, as long as the
behavior is documented.

You're right that to correct it to skip over all contiguous whitespace, we would
need to include \n in the skip-chars-backward part.  I think that is what should
be done, but so be it.  It's easy enough to define a
`forward-whitespace-&-newlines' that DTRT.