[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
http://thread.gmane.org/gmane.emacs.diffs/119990/focus=158194
Can't see any comment from Stefan with this meaning. CC again, forgot
previously.
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?
Yes. To be switched on/off with the mode. Maybe I'm misunderstanding the
purpose?
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 :)
Cheers
except through strings. In Lisp it jumps too
much.)
Ted
- Re: superword-mode, (continued)
- Re: superword-mode, Ted Zlatanov, 2013/03/28
- Re: superword-mode, Ted Zlatanov, 2013/03/29
- Re: superword-mode, Andreas Röhler, 2013/03/29
- Re: superword-mode, Ted Zlatanov, 2013/03/29
- Re: superword-mode, Andreas Röhler, 2013/03/29
- Re: superword-mode, Ted Zlatanov, 2013/03/29
- Re: superword-mode,
Andreas Röhler <=
- Re: superword-mode, Ted Zlatanov, 2013/03/29
- Re: superword-mode, Davis Herring, 2013/03/29
- Re: superword-mode, Stefan Monnier, 2013/03/29
- Re: superword-mode, Ted Zlatanov, 2013/03/29
- Re: superword-mode, Ted Zlatanov, 2013/03/29
- Re: superword-mode, Andreas Röhler, 2013/03/30
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112104: * progmodes/cfengine.el (cfengine-common-syntax): Add "_" to word syntax., Stefan Monnier, 2013/03/22