[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recognizing "end" correctly in Octave mode
From: |
Nicolas Neuss |
Subject: |
Re: recognizing "end" correctly in Octave mode |
Date: |
01 Dec 2006 10:47:11 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Dieter Wilhelm <dieter@duenenhof-wilhelm.de> 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)
A=A0;
m=rows(A); n=columns(A);
for i=1:min(m,n)
A(i+1:m,i)=A(i+1:m,i)/A(i,i);
A(i+1:m,i+1:n) = A(i+1:m,i+1:n)-A(i+1:m,i)*A(i,i+1:n);
end
end
Thank you, Nicolas