Function: vhdl-template-map
vhdl-template-map is an interactive and byte-compiled function defined
in vhdl-mode.el.gz.
Signature
(vhdl-template-map &optional START OPTIONAL SECONDARY)
Documentation
Insert a map specification with association list.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-template-map (&optional start optional secondary)
"Insert a map specification with association list."
(interactive)
(let ((start (or start (point)))
margin end-pos)
(vhdl-insert-keyword "MAP (")
(if (not vhdl-association-list-with-formals)
(if (vhdl-template-field
(concat (and optional "[") "association list" (and optional "]"))
")" (or (not secondary) optional)
(and (not secondary) start) (point))
t
(if (and optional secondary) (delete-region start (point)))
nil)
(if vhdl-argument-list-indent
(setq margin (current-column))
(setq margin (+ (current-indentation) vhdl-basic-offset))
(insert "\n")
(indent-to margin))
(if (vhdl-template-field
(concat (and optional "[") "formal" (and optional "]"))
" => " (or (not secondary) optional)
(and (not secondary) start) (point))
(progn
(vhdl-template-field "actual" ",")
(setq end-pos (point))
(insert "\n")
(indent-to margin)
(while (vhdl-template-field "[formal]" " => " t)
(vhdl-template-field "actual" ",")
(setq end-pos (point))
(insert "\n")
(indent-to margin))
(delete-region end-pos (point))
(delete-char -1)
(insert ")")
(when vhdl-auto-align (vhdl-align-region-groups start (point) 1))
t)
(when (and optional secondary) (delete-region start (point)))
nil))))