From help-request at octave dot org Sun Jan 9 16:03:12 2005 Subject: Re: "end" keyword problem in Emacs Octave mode From: Peter Jensen To: Jonathan Stickel CC: help at octave dot org Date: Sun, 09 Jan 2005 22:05:23 +0000 Jonathan, A simple solution would be to remove "end" from the list of recognized "end of indentation" tokens. This is however not a solution that can go into the distribution, as imported mat*lab scripts would look odd....... Peter Jonathan Stickel wrote: > For some time now I've been bothered by a problem in the Emacs Octave > mode, specifically that the keyword "end" is not treated correctly > when it is used to denote the last index of an array dimension. For > example, consider the code: > > a = 1:5; > for i = 1:length(a) > a(i:end) > endfor > > In emacs octave mode, pressing "tab" or "line-feed" on the endfor line > results in an "unbalanced block" error. Emacs thinks that the "end" > inside the array designation balances the "for" statement. > > Have other people encountered this problem and found a workaround? > Clearly the correct fix would be to patch octave-mod.el to account for > the dual use of "end", but I suspect this is not easy to do. I don't > know enough elisp to fix it myself. > > Thanks, > Jonathan > > P.S. > Who maintains octave-mod.el? I see that it is supplied by my octave > package in Linux. Should emacs octave mode problems be reported to > bugs at octave dot org? > > > > ------------------------------------------------------------- > Octave is freely available under the terms of the GNU GPL. > > Octave's home on the web: http://www.octave.org > How to fund new projects: http://www.octave.org/funding.html > Subscription information: http://www.octave.org/archive.html > ------------------------------------------------------------- > > ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------