Function: verilog-getopt-file
verilog-getopt-file is a byte-compiled function defined in
verilog-mode.el.gz.
Signature
(verilog-getopt-file FILENAME &optional DEFAULT-DIR)
Documentation
Read Verilog options from the specified FILENAME.
Use DEFAULT-DIR to anchor paths if non-nil.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
;;(verilog-getopt (list "+libext+.a+.b" "+incdir+foodir" "+define+a+aval" "-f" "otherf" "-v" "library" "-y" "dir"))
(defun verilog-getopt-file (filename &optional default-dir)
"Read Verilog options from the specified FILENAME.
Use DEFAULT-DIR to anchor paths if non-nil."
(save-excursion
(let ((fns (verilog-library-filenames filename (buffer-file-name)))
(orig-buffer (current-buffer))
line)
(if fns
(set-buffer (find-file-noselect (car fns)))
(error "%s: Can't find verilog-getopt-file -f file: %s"
(verilog-point-text) filename))
(goto-char (point-min))
(while (not (eobp))
(setq line (buffer-substring (point) (line-end-position)))
(forward-line 1)
(when (string-match "//" line)
(setq line (substring line 0 (match-beginning 0))))
(with-current-buffer orig-buffer ; Variables are buffer-local, so need right context.
(verilog-getopt line default-dir))))))