Function: octave-beginning-of-line

octave-beginning-of-line is an interactive and byte-compiled function defined in octave.el.gz.

Signature

(octave-beginning-of-line)

Documentation

Move point to beginning of current Octave line.

If on an empty or comment line, go to the beginning of that line. Otherwise, move backward to the beginning of the first Octave code line which is not inside a continuation statement, i.e., which does not follow a code line ending with ... or is inside an open parenthesis list.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/octave.el.gz
(defun octave-beginning-of-line ()
  "Move point to beginning of current Octave line.
If on an empty or comment line, go to the beginning of that line.
Otherwise, move backward to the beginning of the first Octave code line
which is not inside a continuation statement, i.e., which does not
follow a code line ending with `...' or is inside an open
parenthesis list."
  (interactive)
  (beginning-of-line)
  (unless (looking-at "\\s-*\\($\\|\\s<\\)")
    (while (or (when (cadr (syntax-ppss))
                 (goto-char (cadr (syntax-ppss)))
                 (beginning-of-line)
                 t)
               (and (or (looking-at "\\s-*\\($\\|\\s<\\)")
                        (save-excursion
                          (if (zerop (octave-previous-code-line))
                              (looking-at octave-continuation-regexp))))
                    (zerop (forward-line -1)))))))