Function: vhdl-template-library
vhdl-template-library is an interactive and byte-compiled function
defined in vhdl-mode.el.gz.
Signature
(vhdl-template-library)
Documentation
Insert a library specification.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-template-library ()
"Insert a library specification."
(interactive)
(let ((margin (current-indentation))
(start (point))
name end-pos)
(vhdl-insert-keyword "LIBRARY ")
(when (setq name (vhdl-template-field "names" nil t start (point)))
(insert ";")
(unless (string-match "," name)
(setq end-pos (point))
(insert "\n")
(indent-to margin)
(vhdl-insert-keyword "USE ")
(insert name)
(vhdl-insert-keyword "..ALL;")
(backward-char 5)
(if (vhdl-template-field "package name")
(forward-char 5)
(delete-region end-pos (+ (point) 5)))))))