[Top] [All Lists]

Re: recognizing "end" correctly in Octave mode

Subject: Re: recognizing "end" correctly in Octave mode
From: Nicolas Neuss
Date: 01 Dec 2006 10:47:11 +0100
Dieter Wilhelm <[email protected]> writes:

> Yes, you could change the end keywords in the variable below:
> (defvar octave-end-keywords
>   '("end" "endfor" "endfunction" "endif" "endswitch" "end_try_catch"
>     "end_unwind_protect" "endwhile"))
> but according to this variable "end" is already a valid end-keyword.
> Are you sure it doesn't work properly for "if ... end"?  Then there
> might be a bug in the -calculate-indent function.

Hmm, for me "end" was not included in this list (Emacs 21.4.1, Debian).
Unfortunately, including it does still not help.

This is how Octave mode wants to indent:

function A = LR3 (A0)
  m=rows(A); n=columns(A);
  for i=1:min(m,n)
    A(i+1:m,i+1:n) = A(i+1:m,i+1:n)-A(i+1:m,i)*A(i,i+1:n);

Thank you, Nicolas

<Prev in Thread] Current Thread [Next in Thread>