emacs-devel
[Top][All Lists]
Advanced

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

Re: Confusing doc string of list-or-string at point


From: Juri Linkov
Subject: Re: Confusing doc string of list-or-string at point
Date: Thu, 23 Sep 2021 22:44:37 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> > It looks like it prefers the innermost thing, whether it's a list or a
>> > string.  Is that correct?  If so, why/when/where is this kind of
>> > "thing" useful in practice?
>> 
>> It's useful to just click inside either a list or string,
>> and choose "Select>List" or "Select>String" from the context menu,
>> and it will select the right thing, either a list when clicked inside list,
>> or string when clicked inside a string.
>
> But the same can happen with a list/string enclosed within a defun, or
> a word enclosed withing a string or a list.  Do we also need
> defun-or-string or list-or-string-or-word or any other combinations?

An alternative would be to add a new thing-at-point target 'string'
instead of 'list-or-string'.  But since there is no such function as
'up-string' that would work like 'up-list' but only to go out of the
enclosing string and not out of a list, so what remains to do is
to use 'up-list' with the non-nil arg NO-SYNTAX-CROSSING, therefore
the new target 'list-or-string'.



reply via email to

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