Function: cc-bytecomp-defvar

cc-bytecomp-defvar is a macro defined in cc-bytecomp.el.gz.

Signature

(cc-bytecomp-defvar VAR)

Documentation

Bind the symbol VAR as a variable during compilation of the file.

This can be used to silence the byte compiler. Don't use within eval-when-compile.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-bytecomp.el.gz
(defmacro cc-bytecomp-defvar (var)
  "Bind the symbol VAR as a variable during compilation of the file.
This can be used to silence the byte compiler.  Don't use within
`eval-when-compile'."
  (declare (debug nil))
  `(eval-when-compile
     (if (boundp ',var)
	 (cc-bytecomp-debug-msg
	  "cc-bytecomp-defvar: %s bound already as variable" ',var)
       (if (not (memq ',var cc-bytecomp-unbound-variables))
	   (progn
	     (cc-bytecomp-debug-msg
	      "cc-bytecomp-defvar: Saving %s (as unbound)" ',var)
	     (setq cc-bytecomp-unbound-variables
		   (cons ',var cc-bytecomp-unbound-variables))))
       (if (cc-bytecomp-is-compiling)
	   (progn
	     (defvar ,var)
	     (set ',var (intern (concat "cc-bytecomp-ignore-var:"
					(symbol-name ',var))))
	     (cc-bytecomp-debug-msg
	      "cc-bytecomp-defvar: Covered variable %s" ',var))))))