The most recently established binding takes precedence over the others. Local bindings in Emacs Lisp have indefinite scope and dynamic extent . Scope refers to where textually in the source code the binding can be accessed.
Indefinite scope means that any part of the program can potentially access the variable binding.
Extent refers to when , as the program is executing, the binding exists. Dynamic extent means that the binding lasts as long as the activation of the construct that established it. The combination of dynamic extent and indefinite scope is called dynamic scoping . By contrast, most programming languages use lexical scoping , in which references to a local variable must be located textually within the function or block that binds the variable. Scope Scope means where in the program a value is visible.