Function: vhdl-template-record
vhdl-template-record is an interactive and byte-compiled function
defined in vhdl-mode.el.gz.
Signature
(vhdl-template-record KIND &optional NAME SECONDARY)
Documentation
Insert a record type declaration.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-template-record (kind &optional name secondary)
"Insert a record type declaration."
(interactive)
(let ((margin (current-indentation))
(start (point))
(first t))
(vhdl-insert-keyword "RECORD\n")
(indent-to (+ margin vhdl-basic-offset))
(when (or (vhdl-template-field "element names"
nil (not secondary) start (point))
secondary)
(while (or first (vhdl-template-field "[element names]" nil t))
(insert " : ")
(vhdl-template-field (if (eq kind 'type) "type" "nature") ";")
(vhdl-comment-insert-inline)
(insert "\n")
(indent-to (+ margin vhdl-basic-offset))
(setq first nil))
(delete-region (line-beginning-position) (point))
(indent-to margin)
(vhdl-insert-keyword "END RECORD")
(unless (vhdl-standard-p '87) (and name (insert " " name)))
(insert ";")
(when vhdl-auto-align (vhdl-align-region-groups start (point) 1)))))