Function: vhdl-template-constant
vhdl-template-constant is an interactive and byte-compiled function
defined in vhdl-mode.el.gz.
Signature
(vhdl-template-constant)
Documentation
Insert a constant declaration.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-template-constant ()
"Insert a constant declaration."
(interactive)
(let ((start (point))
(in-arglist (vhdl-in-argument-list-p)))
(vhdl-insert-keyword "CONSTANT ")
(when (vhdl-template-field "name" nil t start (point))
(insert " : ")
(when in-arglist (vhdl-insert-keyword "IN "))
(vhdl-template-field "type")
(if in-arglist
(progn (insert ";")
(vhdl-comment-insert-inline))
(let ((position (point)))
(insert " := ")
(unless (vhdl-template-field "[initialization]" nil t)
(delete-region position (point)))
(insert ";")
(vhdl-comment-insert-inline))))))