emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: syntax for ?= in sh-mode


From: Stefan
Subject: Re: syntax for ?= in sh-mode
Date: Sat, 25 Sep 2004 15:18:50 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (darwin)

>     It moves to right after `c'.  The logic is thefollowing:
>     the precedence-level for the move is determined by the punctuation
>     seen before seeing a parenthesis or a symbol-constituent.

>     I.e. if I'm in front of a `,' and do C-M-f, it'll skip over anything
>     of higher precedence than a comma.

> Ok, that makes sense.  I am not sure whether users will find it
> useful or confusing, though.  I guess the only way to find out
> is to ask them to try it.

As mentioned, it's been implemented (in elisp, not in syntax-tables) in
sml-mode, and it's been distributed like this for a while now (several
years).  I haven't heard any comment about it either way.

I do use the feature myself, and in my experience, it's most useful for
C-M-t (because in this case, you are naturally placed "on" the punctuation,
so it works very intuitively and feels more like a bug-fix than a new
feature).  For C-M-f and friends, it comes in handy every once in a while,
but nothing too significant.

The code was originally implemented for indentation purposes and only later
on used to improve the C-M-f and C-M-t behaviors, so obviously I find it to
be very convenient to write the indentation code.  Having support for it in
syntax-tables would speed things up a lot as well (usually indentation
speed is OK in sml-mode (i.e. basically instantaneous), but in some
pathological cases where we have to backward-sexp over a big expression and
that expression is not surrounded by parentheses (i.e. can't just use the
C code), it can take a noticeable time (I've seen up to 5s on real SML code)).


        Stefan




reply via email to

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