help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thing-at-point: inconsistent behaviour?


From: Barry Margolin
Subject: Re: thing-at-point: inconsistent behaviour?
Date: Wed, 15 Aug 2012 14:34:36 -0400
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <a926tjFeslU1@mid.individual.net>,
 Raffaele Ricciardi <rfflrccrd@gmail.com> wrote:

> Hello there,
> 
> the documentation of `thing-at-point' states that such function returns "the
> thing around or next to point".  This is not the case with either 
> (thing-at-point
> 'symbol) or (thing-at-point 'sexp), for they both may return the thing 
> before
> point.  Try it with the following snippet (! symbolizes the point):

Doesn't "next to" include both immediately before and immediately after?

> 
> A!
> (A)!
> 
> On the contrary, (bounds-of-thing-at-point 'list) returns nil as 
> expected in this
> snippet:
> 
> (A)!
> 
> Is this inconsistent behaviour or am I missing something?
> 
> Tested on GNU Emacs 24.1 started with "emacs -Q".
> 
> Thank you.

I think this is a problem with the thing-at-point handler for 'list.  
It's doing some weird stuff, that I think is intended to distinguide 
lists from sexps.  I guess it's only supposed to match lists embedded in 
code, not the list that represents a toplevel expression.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

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