Function: pascal-goto-defun
pascal-goto-defun is an interactive and byte-compiled function defined
in pascal.el.gz.
Signature
(pascal-goto-defun)
Documentation
Move to specified Pascal function/procedure.
The default is a name found in the buffer around point.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/pascal.el.gz
(defun pascal-goto-defun ()
"Move to specified Pascal function/procedure.
The default is a name found in the buffer around point."
(interactive)
(let* ((default (pascal-get-default-symbol))
(default (if (pascal-comp-defun default nil 'lambda)
default ""))
(label
;; Do completion with default.
(completing-read (format-prompt "Label" default)
;; Complete with the defuns found in the
;; current-buffer.
(let ((buf (current-buffer)))
(lambda (s p a)
(with-current-buffer buf
(pascal-comp-defun s p a))))
nil t "")))
;; If there was no response on prompt, use default value.
(if (string= label "")
(setq label default))
;; Goto right place in buffer if label is not an empty string.
(or (string= label "")
(progn
(goto-char (point-min))
(re-search-forward (pascal-build-defun-re label t))
(beginning-of-line)))))