[Top][All Lists]

[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)")

M-: (bounds-of-thing-at-point 'sexp) RET
=> (1 . 10)
M-: (bounds-of-thing-at-point 'list) RET
=> (10 . 10)
M-: (thing-at-point 'sexp) RET
=> "(foo bar)"
M-: (thing-at-point 'list) RET
=> ""

M-: (save-excursion (goto-char 1) (bounds-of-thing-at-point 'list)) RET
=> (1 . 10)
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 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
Repository revision: 9341142dc876f4d93c442242206a7d2d40fd03af

reply via email to

[Prev in Thread] Current Thread [Next in Thread]