Function: octave-function-file-p
octave-function-file-p is a byte-compiled function defined in
octave.el.gz.
Signature
(octave-function-file-p)
Documentation
Return non-nil if the first token is "function".
The value is (START END NAME-START NAME-END) of the function.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/octave.el.gz
(defun octave-function-file-p ()
"Return non-nil if the first token is \"function\".
The value is (START END NAME-START NAME-END) of the function."
(save-excursion
(goto-char (point-min))
(when (equal (funcall smie-forward-token-function) "function")
(forward-word-strictly -1)
(let* ((start (point))
(end (progn (forward-sexp 1) (point)))
(name (when (progn
(goto-char start)
(re-search-forward octave-function-header-regexp
end t))
(list (match-beginning 3) (match-end 3)))))
(cons start (cons end name))))))