GNU bug report logs -
#31772
26.1; (thing-at-point 'list) regression
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Sun, 10 Jun 2018 03:59:01 UTC
Severity: normal
Found in version 26.1
Done: Leo Liu <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #41 received at 31772 <at> debbugs.gnu.org (full text, mbox):
On 2018-06-11 17:58 +0300, Eli Zaretskii wrote:
> In "emacs -Q", go to the 'h' in "that" on the first line, and then:
>
> M-: (thing-at-point 'list) RET
> => #("hat" 0 3 (fontified nil face font-lock-comment-face))
>
> That's not even a word, let alone a list. Is that useful? I think
> nil is more useful, since nothing should be a list inside a comment.
I have noticed this while coding easy-kill since it built on
thingatpt.el. It was of minor annoyance so I ignored it.
It seems to make a lot of sense to fallback on `sexp' as a degenerated
case. Do you agree the previous behaviour of (thing-at-point 'list) is
mostly sane?
Additional points.
show-paren-mode works inside comments and strings. One of the craziest
things it does is if you have open paren in one string and a close paren
in another, it works too.
characters in and out of comments usually have the same syntax. so
finding a list in comments or strings is not wrong. It's smart and it's
useful. It serves us very well.
Leo
This bug report was last modified 6 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.