Function: verilog-read-auto-params
verilog-read-auto-params is a byte-compiled function defined in
verilog-mode.el.gz.
Signature
(verilog-read-auto-params NUM-PARAM &optional MAX-PARAM)
Documentation
Return parameter list inside auto.
Optional NUM-PARAM and MAX-PARAM check for a specific number of parameters.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
(defun verilog-read-auto-params (num-param &optional max-param)
"Return parameter list inside auto.
Optional NUM-PARAM and MAX-PARAM check for a specific number of parameters."
(let ((olist))
(save-excursion
;; /*AUTOPUNT("parameter", "parameter")*/
(when (not (eq (char-before) ?\*)) ; Not .*
(backward-sexp 1))
(while (looking-at "(?\\s *\"\\([^\"]*\\)\"\\s *,?")
(setq olist (cons (match-string-no-properties 1) olist))
(goto-char (match-end 0))))
(or (eq nil num-param)
(<= num-param (length olist))
(error "%s: Expected %d parameters" (verilog-point-text) num-param))
(if (eq max-param nil) (setq max-param num-param))
(or (eq nil max-param)
(>= max-param (length olist))
(error "%s: Expected <= %d parameters" (verilog-point-text) max-param))
(nreverse olist)))