In addition to buffer-local variable bindings (see Buffer-Local Variables), Emacs supports frame-local bindings. A frame-local binding for a variable is in effect in a frame for which it was defined.
In practice, frame-local variables have not proven very useful.
Ordinary frame parameters are generally used instead (see Frame Parameters). The function make-variable-frame-local, which
was used to define frame-local variables, has been deprecated since
Emacs 22.2. However, you can still define a frame-specific binding
for a variable var in frame frame, by setting the
var frame parameter for that frame:
(modify-frame-parameters frame '((var . value)))
This causes the variable var to be bound to the specified
value in the named frame. To check the frame-specific
values of such variables, use frame-parameter. See Parameter Access.
Note that you cannot have a frame-local binding for a variable that has a buffer-local binding.
blog comments powered by Disqus