Function: vhdl-template-while-loop
vhdl-template-while-loop is an interactive and byte-compiled function
defined in vhdl-mode.el.gz.
Signature
(vhdl-template-while-loop)
Documentation
Insert a while loop.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-template-while-loop ()
"Insert a while loop."
(interactive)
(let* ((margin (current-indentation))
(start (point))
label)
(if (not (eq vhdl-optional-labels 'all))
(vhdl-insert-keyword "WHILE ")
(vhdl-insert-keyword ": WHILE ")
(goto-char start)
(setq label (vhdl-template-field "[label]" nil t))
(unless label (delete-char 2))
(forward-word-strictly 1)
(forward-char 1))
(when vhdl-conditions-in-parenthesis (insert "("))
(when (vhdl-template-field "condition" nil t start (point))
(when vhdl-conditions-in-parenthesis (insert ")"))
(vhdl-insert-keyword " LOOP\n\n")
(indent-to margin)
(vhdl-insert-keyword "END LOOP")
(insert (if label (concat " " label ";") ";"))
(forward-line -1)
(indent-to (+ margin vhdl-basic-offset)))))