Function: vhdl-align-declarations

vhdl-align-declarations is an interactive and byte-compiled function defined in vhdl-mode.el.gz.

Signature

(vhdl-align-declarations &optional SPACING)

Documentation

Align the lines within the declarative part of a design unit.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-align-declarations (&optional spacing)
  "Align the lines within the declarative part of a design unit."
  (interactive)
  (let (beg end)
    (vhdl-prepare-search-2
     (save-excursion
       ;; search for declarative part
       (when (and (re-search-backward "^\\(architecture\\|begin\\|configuration\\|context\\|end\\|entity\\|package\\)\\>" nil t)
		  (not (member (upcase (match-string 1)) '("BEGIN" "END"))))
	 (setq beg (point))
	 (re-search-forward "^\\(begin\\|end\\)\\>" nil t)
	 (setq end (point)))))
    (if beg
	(vhdl-align-region-groups beg end spacing)
      (error "ERROR:  Not within the declarative part of a design unit"))))