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 #20 received at 8667 <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 <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 09:11:07 -0700
> I think `forward-whitespace' is incorrect: \n should be \n+, like this:
> 
> (defun forward-whitespace (arg)
>   (interactive "p")
>   (if (natnump arg)
>       (re-search-forward "[ \t]+\\|\n+" nil 'move arg)
>     (while (< arg 0)
>       (if (re-search-backward "[ \t]+\\|\n+" nil 'move)
> 	  (or (eq (char-after (match-beginning 0)) 10)
> 	      (skip-chars-backward " \t")))
>       (setq arg (1+ arg)))))

Note too that `forward-whitespace' is not currently used anywhere in the Emacs
source files.  Can we please make this change, so that it always moves over all
contiguous whitespace and so takes point up to a non-whitespace char (or eob)?





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.