Take the following example macro, defined in
(defmacro some-macro (&rest body) `(let ((some-variable 1)) ,@body))
And take the following function, defined in a different file,
(defun some-function () (some-macro (do-something)))
function.el is byte-compiled, will
some-variable be bound under lexical or dynamic binding?
I understand this depends on whether the file uses
-*- lexical-binding: t; -*-, so my question specifically regards the following situations:
function.eluses lexical binding, but
macro.eluses lexical binding, but
Does it make a difference if
some-var has been declared global (with a defvar) inside
function.el? If it does, I'm specifically interested in the case where it hasn't.