Function: pascal-get-completion-decl
pascal-get-completion-decl is a byte-compiled function defined in
pascal.el.gz.
Signature
(pascal-get-completion-decl PASCAL-STR)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/pascal.el.gz
(defun pascal-get-completion-decl (pascal-str)
;; Macro for searching through current declaration (var, type or const)
;; for matches of `str' and adding the occurrence to `all'
(let ((end (save-excursion (pascal-declaration-end)
(point)))
(pascal-all ())
match)
;; Traverse lines
(while (< (point) end)
(if (re-search-forward "[:=]" (point-at-eol) t)
;; Traverse current line
(while (and (re-search-backward
(concat "\\((\\|\\<\\(var\\|type\\|const\\)\\>\\)\\|"
pascal-symbol-re)
(point-at-bol) t)
(not (match-end 1)))
(setq match (buffer-substring (match-beginning 0) (match-end 0)))
(if (string-match (concat "\\<" pascal-str) match)
(push match pascal-all))))
(if (re-search-forward "\\<record\\>" (point-at-eol) t)
(pascal-declaration-end)
(forward-line 1)))
pascal-all))