Function: verilog-set-define
verilog-set-define is a byte-compiled function defined in
verilog-mode.el.gz.
Signature
(verilog-set-define DEFNAME DEFVALUE &optional BUFFER ENUMNAME)
Documentation
Set the definition DEFNAME to the DEFVALUE in the given BUFFER.
Optionally associate it with the specified enumeration ENUMNAME.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
(defun verilog-set-define (defname defvalue &optional buffer enumname)
"Set the definition DEFNAME to the DEFVALUE in the given BUFFER.
Optionally associate it with the specified enumeration ENUMNAME."
(with-current-buffer (or buffer (current-buffer))
;; Namespace intentionally short for AUTOs and compatibility
(let ((mac (intern (concat "vh-" defname))))
;;(message "Define %s=%s" defname defvalue) (sleep-for 1)
;; Need to define to a constant if no value given
(set (make-local-variable mac)
(if (equal defvalue "") "1" defvalue)))
(if enumname
;; Namespace intentionally short for AUTOs and compatibility
(let ((enumvar (intern (concat "venum-" enumname))))
;;(message "Define %s=%s" defname defvalue) (sleep-for 1)
(unless (boundp enumvar) (set enumvar nil))
(add-to-list (make-local-variable enumvar) defname)))))