Function: vhdl-template-architecture

vhdl-template-architecture is an interactive and byte-compiled function defined in vhdl-mode.el.gz.

Signature

(vhdl-template-architecture)

Documentation

Insert architecture.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-template-architecture ()
  "Insert architecture."
  (interactive)
  (let ((margin (current-indentation))
	(start (point))
	arch-name)
    (vhdl-insert-keyword "ARCHITECTURE ")
    (when (setq arch-name
		(vhdl-template-field "name" nil t start (point)))
      (vhdl-insert-keyword " OF ")
      (if (save-excursion
	    (vhdl-prepare-search-1
	     (vhdl-re-search-backward "\\<entity \\(\\w+\\) is\\>" nil t)))
	  (insert (match-string 1))
	(vhdl-template-field "entity name"))
      (vhdl-insert-keyword " IS\n")
      (vhdl-template-begin-end
       (unless (vhdl-standard-p '87) "ARCHITECTURE") arch-name margin
       (memq vhdl-insert-empty-lines '(unit all))))))