Function: octave-goto-function-definition
octave-goto-function-definition is a byte-compiled function defined in
octave.el.gz.
Signature
(octave-goto-function-definition FN)
Documentation
Go to the function definition of FN in current buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/octave.el.gz
(defun octave-goto-function-definition (fn)
"Go to the function definition of FN in current buffer."
(let ((search
(lambda (re sub)
(let ((orig (point)) found)
(goto-char (point-min))
(while (and (not found) (re-search-forward re nil t))
(when (and (equal (match-string sub) fn)
(not (nth 8 (syntax-ppss))))
(setq found t)))
(unless found (goto-char orig))
found))))
(pcase (and buffer-file-name (file-name-extension buffer-file-name))
("cc" (funcall search
"\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
(_ (funcall search octave-function-header-regexp 3)))))