GNU bug report logs - #17955
24.3.92; octave.el: indentation following ... or \

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sun, 6 Jul 2014 09:38:02 UTC

Severity: minor

Tags: fixed

Found in version 24.3.92

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 17955 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 17955 <at> debbugs.gnu.org
Subject: Re: bug#17955: 24.3.92; octave.el: indentation following ... or \
Date: Sun, 06 Jul 2014 21:49:41 -0400
> 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




This bug report was last modified 3 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.