Function: octave-next-code-line
octave-next-code-line is an interactive and byte-compiled function
defined in octave.el.gz.
Signature
(octave-next-code-line &optional ARG)
Documentation
Move ARG lines of Octave code forward (backward if ARG is negative).
Skips past all empty and comment lines. Default for ARG is 1.
On success, return 0. Otherwise, go as far as possible and return -1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/octave.el.gz
;;; Motion
(defun octave-next-code-line (&optional arg)
"Move ARG lines of Octave code forward (backward if ARG is negative).
Skips past all empty and comment lines. Default for ARG is 1.
On success, return 0. Otherwise, go as far as possible and return -1."
(interactive "p")
(or arg (setq arg 1))
(beginning-of-line)
(let ((n 0)
(inc (if (> arg 0) 1 -1)))
(while (and (/= arg 0) (= n 0))
(setq n (forward-line inc))
(while (and (= n 0)
(looking-at "\\s-*\\($\\|\\s<\\)"))
(setq n (forward-line inc)))
(setq arg (- arg inc)))
n))