emacs-devel
[Top][All Lists]
Advanced

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

Re: superword-mode


From: Ted Zlatanov
Subject: Re: superword-mode
Date: Fri, 29 Mar 2013 14:10:39 -0400
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

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.

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

http://thread.gmane.org/gmane.emacs.diffs/119990/focus=158194

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
syntax?  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, except through strings.  In Lisp it jumps too
much.)

Ted




reply via email to

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