[Top][All Lists]

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

Re: superword-mode

From: Andreas Röhler
Subject: Re: superword-mode
Date: Fri, 29 Mar 2013 19:50:12 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

Am 29.03.2013 19:10, schrieb Ted Zlatanov:
On Fri, 29 Mar 2013 18:49:04 +0100 Andreas Röhler <address@hidden> wrote:

AR> IMO that can't work, as forward-sexp has a long-time bug wrt to
AR> strings.

AR> bug#13973: Subject: 24.3; thingatpt.el, end-of-sexp

I'm not convinced that the bug shouldn't be fixed instead.

That would help, but not make the use of forward-sexp perfect for your purpose.
Simply because a sexp is still a wider object than the kind you address.

AR> BTW why not simply change the syntax-class using modify-syntax-entry?

That was my original approach, but it's incorrect according to Stefan.

AR> Oh, because python-mode.el proceeds that way? :)
AR> Can't see that stand in this thread, will cc it to him.

Start with


Can't see any comment from Stefan with this meaning. CC again, forgot 

or gather the thread from this article upwards.  For `cfengine-mode' I
modified all the motion to use \_> and \_< instead of \> and \<

AR> Assume it's a misunderstanding, as mode-specific syntax-changes are common.

AR> BTW forward-sexp docu says it's not usable from inside a string. Once the 
bug is fixed,
AR> that might be dropped.

So you're saying that `superword-mode' should simply add "_" to the word

Yes. To be switched on/off with the mode. Maybe I'm misunderstanding the 

 Or something else?  Sorry to be dense.

Another possibility is to make the motion context-sensitive, so we move
by word inside strings or comments but by sexp or symbol outside them.

(I actually discovered I like using `forward-sexp' with `superword-mode'
in non-Lisp languages,

Sure it will work mostly. It might work always - beside of the bugs still 
unseen  :)


except through strings.  In Lisp it jumps too


reply via email to

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