GNU bug report logs -
#14457
24.3; buggy forward-sexp in octave mode?
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Fri, 24 May 2013 03:09:02 UTC
Severity: normal
Found in version 24.3
Done: Leo Liu <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Since 'case', 'otherwise' are closers to 'switch' as in
> smie-closer-alist, I was expecting (forward-sexp -1) to jump back to
> 'switch', much like from 'elseif' to 'if'. Does this make sense?
Both behaviors make sense. Note that elseif/else behaves just like
case/otherwise: if will stop at the previous matching elseif.
For indentation purpose it's better if it doesn't jump
too far, which is why octave-mode currently behaves this way.
The reason why it's better is:
- faster indentation since we parse less of the buffer.
- more local decision means that the behavior is easier to understand
for the user.
- also means that it better takes into account choices of the user: if
the user decides to place his "case" at some other indentation, only
the first "case" after "switch" will disagree with the user, all the
other ones will simply align under the first.
Ideally, this behavior would also allow to use C-M-t to transpose two
cases, just like you can do with the usual infix operators/separators,
but currently this doesn't work (and it can't be done with "otherwise").
Stefan
This bug report was last modified 11 years and 353 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.