Subject: bug#6869: Octave mode: incorrect "unbalanced block" warning

From: Stefan Monnier <[email-masked]>
Date: Tue, 17 Aug 2010 11:11:38 +0200

> I am getting "unbalanced block" warnings when I hit tab on the
> "endfunction" at the end of an m-file (function is cut-and-pasted
> below).  It is on windows, but I don't think that is the cause of *this*
> bug. I have tested the function and it works fine, so I don't think it
> is my octave code.

It's a bug in octave's indentation code, indeed.  It gets confused by
the "end" in the following line:

>   x = data(:,2:end);

I don't know Octave much, as it so happens but I've recently been
playing with a new indentation code for Octave (using SMIE), so I'm
interested in fixing it.  Could you explain to me what is this "end"
(and more generally what the "data(:,2:end)" means: all I can guess is
that it's an array indexing of some sort).
The Octave manual doesn't seem to talk about it.

        Stefan