Function: vhdl-subprog-flatten

vhdl-subprog-flatten is an interactive and byte-compiled function defined in vhdl-mode.el.gz.

Signature

(vhdl-subprog-flatten)

Documentation

Flatten interface list so that only one parameter exists per line.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-subprog-flatten ()
  "Flatten interface list so that only one parameter exists per line."
  (interactive)
  (if (not vhdl-subprog-list)
      (error "ERROR:  No subprogram interface has been read")
    (message "Flattening subprogram interface...")
    (let ((old-subprog-list (nth 2 vhdl-subprog-list))
	  new-subprog-list old-subprog new-subprog names)
      ;; traverse parameter list and flatten entries
      (while old-subprog-list
	(setq old-subprog (car old-subprog-list))
	(setq names (car old-subprog))
	(while names
	  (setq new-subprog (cons (list (car names)) (cdr old-subprog)))
	  (setq new-subprog-list (append new-subprog-list (list new-subprog)))
	  (setq names (cdr names)))
	(setq old-subprog-list (cdr old-subprog-list)))
      (setq vhdl-subprog-list
	    (list (nth 0 vhdl-subprog-list) (nth 1 vhdl-subprog-list)
		  new-subprog-list (nth 3 vhdl-subprog-list)
		  (nth 4 vhdl-subprog-list) (nth 5 vhdl-subprog-list))
	    vhdl-subprog-flattened t)
    (message "Flattening subprogram interface...done"))))