[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: tool-bar: frame-local tool-bar-button-margin]
From: |
Chong Yidong |
Subject: |
Re: address@hidden: tool-bar: frame-local tool-bar-button-margin] |
Date: |
Mon, 24 Oct 2005 19:51:03 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> Would someone please investigate this bug, and ack?
>
> From: David Reitter <address@hidden>
> Subject: tool-bar: frame-local tool-bar-button-margin
> To: address@hidden
>
> Making tool-bar-button-margin a frame-local variable doesn't have the
> desired effect.
> When several frames are open, a change to this variable will change
> all tool-bars, not just the one belonging to the current frame.
The trouble is that tool-bar-button-margin is not a frame parameter.
The documentation for make-variable-frame-local says:
Enable variable to have frame-local bindings.
When a frame-local binding exists in the current frame,
it is in effect whenever the current buffer has no buffer-local binding.
A frame-local binding is actually a frame parameter value;
thus, any given frame has a local binding for variable if it has
a value for the frame parameter named variable. Return variable.
See `modify-frame-parameters' for how to set frame parameters.
The Elisp documentation is a little more explicit:
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...
make-variable-frame-local:
Enable the use of frame-local bindings for VARIABLE. This does
not in itself create any frame-local bindings for the variable;
however, if some frame already has a value for VARIABLE as a frame
parameter, that value automatically becomes a frame-local binding.
Using modify-frame-parameters followed by make-variable-frame-local, I
am indeed able to get frame-local values for tool-bar-button margin.
Probably the docstring for make-variable-frame-local should be
rephrased to make it clearer.