Function: byte-compile-variable-set

byte-compile-variable-set is a byte-compiled function defined in bytecomp.el.gz.

Signature

(byte-compile-variable-set VAR)

Documentation

Generate code to set the variable VAR from the top-of-stack value.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defun byte-compile-variable-set (var)
  "Generate code to set the variable VAR from the top-of-stack value."
  (byte-compile-check-variable var 'assign)
  (let ((lex-binding (assq var byte-compile--lexical-environment)))
    (if lex-binding
	;; VAR is lexically bound.
        (byte-compile-stack-set (cdr lex-binding))
      ;; VAR is dynamically bound.
      (byte-compile-free-vars-warn var var t)
      (byte-compile-dynamic-variable-op 'byte-varset var))))