From owner-bug-octave at bevo dot che dot wisc dot edu Thu Nov 9 05:05:20 1995 Subject: Indent in new octave-mode From: Eyal Doron To: bug-octave at bevo dot che dot wisc dot edu Date: Thu, 9 Nov 1995 11:32:22 +0100 (MET) Hi, I think there was a problem with my previous mail, so here goes. The new octave-mode has severe problems with indentation. In particular, it fails to recognize e.g. endfor if its not on a separate line, and in general indentation seems wronf throughout. Two convenience points: 1) matlab-mode.el can be told to auto-indent after newlines. It would be very convenient to put that into octave-mode as well. 2) It would be convenient to be able to switch off indentation of the function...endfunction block. Not everybody uses endfunction, especially if they want the routine to work in Matlab as well, so that is a superfluous indentation level in that case. Also, I haven't checked, but the old Matlab mode had problems with "%" inside strings, sometimes recognizing that as a comment character. The new matlab-mode fixes (or rather kludges) that. Do you take care of that problem if the comment character is set to "%"? As to comments, I think the default of "#" for a comment char is not a good choice, as its incompatible with Matlab. Almost everybody who uses both Octave and Matlab will have to change it anyway. Question - any chance of having just plain "end" work like the specialized "endif", etc with regards to matching the beginning of the block? Thats really useful. Finally, it would be cool if Octave could be run as a parser. Then one could "compile" the .m files from within Emacs, and perhaps auto-step to parse errors. Don't know if its possible to be even more sophisticated, but you could give it some thought. Thanks, Eyal Doron