Function: vhdl-scan-context-clause

vhdl-scan-context-clause is a byte-compiled function defined in vhdl-mode.el.gz.

Signature

(vhdl-scan-context-clause)

Documentation

Scan the context clause that precedes a design unit.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Scan functions

(defun vhdl-scan-context-clause ()
  "Scan the context clause that precedes a design unit."
  (let (lib-alist)
    (save-excursion
      (when (re-search-backward "^[ \t]*\\(architecture\\|configuration\\|context\\|entity\\|package\\)\\>" nil t)
	(while (and (re-search-backward "^[ \t]*\\(end\\|use\\)\\>" nil t)
		    (equal "USE" (upcase (match-string 1))))
	  (when (looking-at "^[ \t]*use[ \t\n\r\f]*\\(\\w+\\)\\.\\(\\w+\\)\\.\\w+")
	    (push (cons (match-string-no-properties 1)
					(vhdl-match-string-downcase 2))
		  lib-alist)))))
    lib-alist))