In Octave mode, the following special Emacs commands can be used in addition to the standard Emacs commands.
Break Octave line at point, continuing comment if within one. Insert
octave-continuation-string before breaking the line unless
inside a list. If within a double-quoted string, insert
octave-string-continuation-marker instead. Signal an error if
within a single-quoted string.
Query replace function names in function file comment.
Move one line of Octave code backward, skipping empty and comment
octave-previous-code-line). With numeric prefix
argument n, move that many code lines backward (forward if
n is negative).
Move one line of Octave code forward, skipping empty and comment lines
octave-next-code-line). With numeric prefix argument n,
move that many code lines forward (backward if n is negative).
Move to the beginning of the physical line
octave-beginning-of-line). If point is in an empty or comment
line, simply go to its beginning; otherwise, move backwards to the
beginning of the first code line which is not inside a continuation
statement, i.e., which does not follow a code line ending in
‘...’ or ‘\’, or is inside an open parenthesis list.
Move to the end of the physical line (
point is in a code line, move forward to the end of the first Octave
code line which does not end in ‘...’ or ‘\’ or is inside an
open parenthesis list. Otherwise, simply go to the end of the current
Put point at the beginning of this block, mark at the end
octave-mark-block). The block marked is the one that contains
point or follows point.
Close the current block on a separate line (
An error is signaled if no block to close is found.
Insert a function skeleton, prompting for the function’s name, arguments
and return values which have to be entered without parentheses
in one of your Emacs startup files.
The following variables can be used to customize Octave mode.
nil means show matching begin of block when inserting a space,
newline or ‘;’ after an else or end keyword. Default is
This is an extremely useful feature for automatically verifying that the
keywords match—if they don’t, an error message is displayed.
Extra indentation applied to statements in block structures. Default is 2.
Extra indentation applied to Octave continuation lines. Default is 4.
Highlight texinfo comment blocks. The default value is
If Font Lock mode is enabled, Octave mode will display
There is also rudimentary support for Imenu (see Imenu in The GNU Emacs Manual). Currently, function names can be indexed.
ElDoc mode (see Lisp Doc in The GNU Emacs Manual) is
supported. By customizing
octave-eldoc-message-style it can be
changed from displaying one or multi line hints.
Customization of Octave mode can be performed by modification of the