GNU bug report logs - #8667
24.0.50; `bounds-of-thing-at-point' returns (N . N) for `comment'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 13 May 2011 00:47:02 UTC

Severity: normal

Merged with 8670

Found in version 24.0.50

Done: "Drew Adams" <drew.adams <at> oracle.com>

Bug is archived. No further changes may be made.

Full log


Message #33 received at 8667-close <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 8667-close <at> debbugs.gnu.org
Subject: RE: bug#8667: 24.0.50;
	`bounds-of-thing-at-point' returns (N . N) for `comment'
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.





This bug report was last modified 14 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.