Function: byte-compile-file-form-defvar-function

byte-compile-file-form-defvar-function is a byte-compiled function defined in bytecomp.el.gz.

Signature

(byte-compile-file-form-defvar-function FORM)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defun byte-compile-file-form-defvar-function (form)
  (pcase-let (((or `',name (let name nil)) (nth 1 form)))
    (if name (byte-compile--declare-var name))
    ;; Variable aliases are better declared before the corresponding variable,
    ;; since it makes it more likely that only one of the two vars has a value
    ;; before the `defvaralias' gets executed, which avoids the need to
    ;; merge values.
    (pcase form
      (`(defvaralias ,_ ',newname . ,_)
       (when (memq newname byte-compile-bound-variables)
         (if (byte-compile-warning-enabled-p 'suspicious)
             (byte-compile-warn-x
              newname
              "Alias for `%S' should be declared before its referent"
              newname)))))
    (let ((doc (nth 3 form)))
      (when (stringp doc)
        (setcar (nthcdr 3 form)
                (byte-compile--docstring doc (nth 0 form) name))))
    (byte-compile-keep-pending form)))