GNU bug report logs - #9300
24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING

Previous Next

Package: emacs;

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

Date: Sun, 14 Aug 2011 22:39:03 UTC

Severity: minor

Found in version 24.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: 9300 <at> debbugs.gnu.org
Subject: bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING
Date: Sun, 14 Aug 2011 15:36:53 -0700
emacs -Q
 
In a Lisp buffer, put point after a list: just after the closing paren.
 
M-: (bounds-of-thing-at-point 'sexp)
 
It should return nil, since there is no sexp at point.  Instead it
returns the bounds of the sexp at the previous char (the closing paren).
 
The fix is to change these two sexps in the code:
 
(<= orig real-end) SHOULD BE (< orig real-end)
(<= orig end)      SHOULD BE (< orig end)
 
The tests for the THING'S beginning are correct - they should be <=, as
they are.  But the tests for the THING's end are incorrect - they should
always be <.
 
The reason is that the function that is (get THING 'end-op) moves PAST
the THING, so that point is not on the THING.  This is true generally,
no matter the type of THING.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-08-08 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'
 





This bug report was last modified 3 years and 30 days ago.

Previous Next


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