[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when j
bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING
Sun, 14 Aug 2011 15:36:53 -0700
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 220.127.116.11 (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'
|[Prev in Thread]
||[Next in Thread]|
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING,
Drew Adams <=