emacs-devel
[Top][All Lists]
Advanced

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

Re: mark-word


From: Andreas Röhler
Subject: Re: mark-word
Date: Thu, 15 Nov 2007 11:04:22 +0100
User-agent: KMail/1.9.5

Am Donnerstag, 15. November 2007 09:40 schrieb Lennart Borgman (gmail):
> >> Is there a mark-thing-at-point?
> >
> > No
> >
> >> If there were then mark-word-at-point could be implemented using that.
> >
> > It could also be implemented rather simply using primitive functions.
> > The thing-at-point code is hairy and ugly, so it seems backwards to base
> > other simpler functions on it...
>
> Using thing-at-point to make mark-thing-at-point (and then
> mark-work-at-point etc) would mean that it is consistent and eaiser for
> the user to remember.
>

As the original issue seems to have no chance, just one
remark to `thing-at-point' (which I should not have
introduced here beside)

As Miles pointed out the code is hairy. Indeed, it's
buggy.

However the idea behind seems valid: Given `beginning'
and `end' of THING, you may reuse a set of functions ad
infinitum, one for all.

The bugs come in, if underlying moving functions don't
stop at the end of THING but one char after.

After cutting this dependencies--see 
thingatpt-utils in gnu-emacs-source--everything 
works fine AFAIS.

Concering the example delivered by Stephen:

foo bar baz?   quux
_____________|____

M-x mark-word-at-point
=> beginning-of-thing: No word here

That's correct, so I can't reproduce the problem.

OTOH the bug described above would show up if cursor is
over question mark.

Then `baz' is marked but should not, because a question
mark is not a word. The same if cursor is beneath foo. Foo is marked, while
cursor over space.

Thanks all

Andreas Röhler




reply via email to

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