Function: vhdl-template-begin-end
vhdl-template-begin-end is a byte-compiled function defined in
vhdl-mode.el.gz.
Signature
(vhdl-template-begin-end CONSTRUCT NAME MARGIN &optional EMPTY-LINES)
Documentation
Insert a begin ... end pair with optional name after the end.
Point is left between them.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Subtemplates
(defun vhdl-template-begin-end (construct name margin &optional empty-lines)
"Insert a begin ... end pair with optional name after the end.
Point is left between them."
(let (position)
(when (or empty-lines (eq vhdl-insert-empty-lines 'all)) (insert "\n"))
(indent-to margin)
(vhdl-insert-keyword "BEGIN")
(when (and (or construct name) vhdl-self-insert-comments)
(insert " --")
(when construct (insert " ") (vhdl-insert-keyword construct))
(when name (insert " " name)))
(insert "\n")
(when (or empty-lines (eq vhdl-insert-empty-lines 'all)) (insert "\n"))
(indent-to (+ margin vhdl-basic-offset))
(setq position (point))
(insert "\n")
(when (or empty-lines (eq vhdl-insert-empty-lines 'all)) (insert "\n"))
(indent-to margin)
(vhdl-insert-keyword "END")
(when construct (insert " ") (vhdl-insert-keyword construct))
(insert (if name (concat " " name) "") ";")
(goto-char position)))