Function: vhdl-template-configuration-decl
vhdl-template-configuration-decl is an interactive and byte-compiled
function defined in vhdl-mode.el.gz.
Signature
(vhdl-template-configuration-decl)
Documentation
Insert a configuration declaration.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-template-configuration-decl ()
"Insert a configuration declaration."
(interactive)
(let ((margin (current-indentation))
(start (point))
entity-exists string name position)
(vhdl-insert-keyword "CONFIGURATION ")
(when (setq name (vhdl-template-field "name" nil t start (point)))
(vhdl-insert-keyword " OF ")
(save-excursion
(vhdl-prepare-search-1
(setq entity-exists (vhdl-re-search-backward
"\\<entity \\(\\w*\\) is\\>" nil t))
(setq string (match-string 1))))
(if (and entity-exists (not (equal string "")))
(insert string)
(vhdl-template-field "entity name"))
(vhdl-insert-keyword " IS\n")
(when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
(indent-to (+ margin vhdl-basic-offset))
(setq position (point))
(insert "\n")
(when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n"))
(indent-to margin)
(vhdl-insert-keyword "END ")
(unless (vhdl-standard-p '87)
(vhdl-insert-keyword "CONFIGURATION "))
(insert name ";")
(goto-char position))))