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

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

Re: recognizing "end" correctly in Octave mode


From: Dieter Wilhelm
Subject: Re: recognizing "end" correctly in Octave mode
Date: Fri, 01 Dec 2006 08:27:24 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Nicolas Neuss <lastname@mathematik.uni-karlsruhe.de> writes:

> Hello,
>
> Octave (which is similar to Matlab) allows both "end" and "end<op>" for
> teminating constructs, e.g. I can write both "if ... endif" and "if
> ... end".  However, Octave mode does not recognize the "if ... end"
> construct correctly (i.e. indentation is wrong).  Is it possible to change
> this behaviour?

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.

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany




reply via email to

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