Changes in version 0.8 ********************** * Comment types. Octave mode can now distinguish between various types of comments, similar to Emacs Lisp: `#' To be aligned to the same column on the right of the source code. `##' To be aligned to the same level of indentation as the code. `###' To start at the left margin. (Without this distinction, things like code # This is an inline comment which extends # across on line were not uniquely identifiable, because the second line of the in-line comment could not be distinguished from a full-line comment.) * Inferior Octave support. It is now possible to run Octave from within Emacs, either by directly entering commands at the prompt in a buffer in Inferior Octave mode, or by interacting with Octave from within a file with Octave code. This is useful in particular for debugging Octave code. For more details, see the Texinfo documentation. * New function `octave-insert-defun' to reduce typing effort. Changes in version 0.7 ********************** This version is a rather complete rewrite of 0.6. In general, it was attempted to use standard Emacs features and functions as much as possible. * Font Lock support was improved and enhanced. Function declarations are now fontified correctly. Builtin keywords (reserved words and text functions) and variables are now fontified as well. * Partial Imenu support was added. Function declarations can now be indexed. * A completion mechanism for builtin keywords and variables was added. Completion can be performed by pressing M-TAB (octave-complete-symbol) after typing the initial characters of the keyword. In a future release, completion (as well as imenu and font locking) may also include user defined variables. * Bug reporting. The function octave-submit-bug-report was added. * Commands for dealing with blocks. The functions for dealing with begin-else-end blocks were rewritten from scratch. They are now based on the function octave-scan-blocks, which works similar to the standard Emacs scan-lists function. One can now go forward and backward across balanced blocks, and go up and down block levels. It is no longer required that extended `end' keywords are used; in fact, an error message will be issued in the case of nonmatching block keywords. Matching is achieved through one general function, and now also works for else keywords. The block motion commands are octave-forward-block octave-backward-block octave-down-block octave-up-block octave-backward-up-block One can also mark the `current' block (the innermost block containing point) using octave-mark-block. * Commands for dealing with functions. Moving across functions, as well as marking and indenting them now works as for defuns in Lisp mode. * Filling. The code for auto-filling was rewritten, and octave-fill-paragraph was added. The code for filling is far from perfection yet. In future releases, a function for filling the region will be added. The problem of getting the right fill function after toggling Auto-Fill mode was solved by an advice to auto-fill-mode. * Abbrevs. The mechanism of listing all abbrevs using `? or ` was retained. All other abbrev code was dropped---why should Octave mode only use its own abbrevs? * Comments. As the comment syntax and comment-start are specified correctly, one can use the standard comment-region. The function octave-uncomment-region is still provided, but now based on comment-region. The special treatment of commenting regions was removed, but may easily be added again. * Paragraphs. Empty lines and form feeds are now recognized as separating paragraphs of Octave code, so one can now move across them and fill them. * Indentation. Indentation should work without problems now, assuming `sane' coding. The problems in 0.6 which came from assuming that only one else or end keyword would occur in one line should now have disappeared. The user-level variables for customizing indentation were renamed as follows: 0.7 0.6 octave-block-offset octave-stmt-indent octave-continuation-offset octave-continuation-indent Of course, it is still easy to write code in a way that makes Octave mode get the indentations wrong. For example, if (something) \ will result in having octave-continuation-offset added although this is wrong. Or, printf ("This is some stupid %s \ for getting indentation wrong.", "text") is what you deserve anyway :-) Octave mode currently assumes that strings do not extend across lines ... * Other commands for moving. The functions octave-previous-statement and octave-next-statement were removed, partially because their names do not coincide with the usage of `statement' in the Octave manual. The functions now provided are octave-previous-code-line octave-next-code-line octave-beginning-of-line octave-end-of-line The first two look for the previous or next `code' line, i.e., they skip across all empty or comment lines. The latter two also go understand continuation lines, and move to their beginning and end, respectively. The effect of the former octave-previous-statement can now be achieved upon following octave-previous-code-line by octave-beginning-of-line. * Special insertions: LFD, SPC and semicolon. These characters are now `electric', doing a little extra work. All three expand abbrevs if abbrev mode is on and blink matching blocks if octave-blink-matching-blocks is t. In future versions, SPC might also do auto-newlining after certain keywords (or e.g., a continuation character). * User-level customization. The variables for customizing Octave mode are as follows. ** As in 0.6. octave-auto-newline octave-comment-column octave-comment-start octave-continuation-string ** Different from 0.6. 0.7 0.6 octave-blink-matching-block octave-blink-matching-blocks octave-block-offset octave-statement-indent octave-continuation-offset octave-continuation-indent octave-inhibit-startup-message octave-startup-message The first three have only been renamed. (The first in analogy to the standard blink-matching-paren, the others because they are really extra offsets and not the absolute indentations.) Controlling startup messages now works as in Emacs itself. ** New in 0.7. octave-fill-column ** Removed from 0.7. octave-comment-indent-style octave-comment-indent-char octave-comment-region * Help A mechanism for looking up entries in the indices of ALL info files with documentation for Octave (as specified by octave-help-files) was added (octave-help). If multiple matches are found, one can cycle through the matches. * Other changes. octave-comment-hook was removed. One can instead use the standard Emacs indent-for-comment.