** Frame-local variables.
You can now make a variable local to various frames. To do this, call
the function make-variable-frame-local; this enables frames to have
local bindings for that variable.
These frame-local bindings are actually frame parameters: you create a frame-local binding in a specific frame by calling modify-frame-parameters and specifying the variable name as the parameter name.
Buffer-local bindings take precedence over frame-local bindings. Thus, if the current buffer has a buffer-local binding, that binding is active; otherwise, if the selected frame has a frame-local binding, that binding is active; otherwise, the default binding is active.
It would not be hard to implement window-local bindings, but it is not clear that this would be very useful; windows tend to come and go in a very transitory fashion, so that trying to produce any specific effect through a window-local binding would not be very robust.