[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
From: |
Tino Calancha |
Subject: |
bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING |
Date: |
Mon, 20 Jun 2016 18:21:09 +0900 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
Consider following code:
emacs -Q:
C-x b foo RET
M-: (insert "(foo bar)")
I)
M-: (bounds-of-thing-at-point 'sexp) RET
=> (1 . 10)
II)
M-: (bounds-of-thing-at-point 'list) RET
=> (10 . 10)
III)
M-: (thing-at-point 'sexp) RET
=> "(foo bar)"
IV)
M-: (thing-at-point 'list) RET
=> ""
V)
M-: (save-excursion (goto-char 1) (bounds-of-thing-at-point 'list)) RET
=> (1 . 10)
VI)
M-: (save-excursion (goto-char 1) (bounds-of-thing-at-point 'sexp)) RET
=> (1 . 10)
* I agree with Drew that there is neither sexp nor list at point,
so i would expect I), II), III) and IV) returning nil.
* Both function names, i.e., functions at I) and III), and their doc strings
looks clear: return THING at point (III) or return the locations
of THING at point. If there is no such THING at point i would expect
both return nil: IMO that would be more consistent/intuitive with the
func.
names and doc strings.
* I) and II) agree but III) and IV disagree.
I would expect III) and IV) returning the same value.
In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
Repository revision: 9341142dc876f4d93c442242206a7d2d40fd03af
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING,
Tino Calancha <=
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Dmitry Gutov, 2016/06/20
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Eli Zaretskii, 2016/06/20
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Drew Adams, 2016/06/20
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Andreas Röhler, 2016/06/20
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Eli Zaretskii, 2016/06/20
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Drew Adams, 2016/06/20
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Noam Postavsky, 2016/06/20
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Drew Adams, 2016/06/20
- bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING, Andreas Röhler, 2016/06/21