Function: vhdl-do-list
vhdl-do-list is a byte-compiled function defined in vhdl-mode.el.gz.
Signature
(vhdl-do-list FUNCTION &optional SPACING)
Documentation
Apply FUNCTION to lines of a list surrounded by a balanced group of parentheses.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/vhdl-mode.el.gz
(defun vhdl-do-list (function &optional spacing)
"Apply FUNCTION to lines of a list surrounded by a balanced group of parentheses."
(let (beg end)
(save-excursion
;; search for beginning of balanced group of parentheses
(setq beg (vhdl-re-search-backward "[()]" nil t))
(while (looking-at ")")
(forward-char) (backward-sexp)
(setq beg (vhdl-re-search-backward "[()]" nil t)))
;; search for end of balanced group of parentheses
(when beg
(forward-list)
(setq end (point))
(goto-char (1+ beg))
(skip-chars-forward " \t\n\r\f")
(setq beg (point))))
;; run FUNCTION
(if beg
(funcall function beg end spacing)
(error "ERROR: Not within a list enclosed by a pair of parentheses"))))