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

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

bug#17955: 24.3.92; octave.el: indentation following ... or \


From: Stefan Monnier
Subject: bug#17955: 24.3.92; octave.el: indentation following ... or \
Date: Sun, 06 Jul 2014 21:49:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> As reported on 2013-07-03 in
> http://article.gmane.org/gmane.comp.gnu.octave.maintainers/33796

> In octave mode:

> a = \
> b

> b is aligned to a. Previously there was an offset per
> octave-continuation-offset.

> The octave smie lexer may or may not return the continuation token (...
> or \), any idea why it is made to behave like this?
> octave-continuation-offset is also unused. Comments?

Same as for sh-script's SMIE support, the new indentation code performs
indentation of continued lines as if the "backslash newline" was
a normal newline except it doesn't contain an implicit semi-colon.
So you should get indentation like:

   a = b + a * \
           c

So you should be able to control indentation of "b" above by tweaking
the (:after . "=") or (:before . "=") rule.

That indentation style is incompatible with octave-continuation-offset
(which basically assumes that continued lines are just a single line
wrapped).  But, just like we did in sh-script.el, we could/should
probably add an indentation rule to SMIE to make sure that continued
lines are indented at least as much as octave-continuation-offset.


        Stefan





reply via email to

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