Bindings are Scheme closures

The Tk bind command associates Scheme scripts with X events. Starting with version 3.0 those scripts must be Scheme closures[*]. Binding closures can have parameters. Those parameters are one char symbols (with the same conventions than the Tcl % char, see the bind help page for details). For instance, the following Tcl script
\begin{scheme}
bind .w <ButtonPress-3> \{puts ''Press on widget \%W at position \%x \%y''\}
\end{scheme}
can be translated into
\begin{scheme}
(bind .w ''<ButtonPress-3>''
(lambda (\vert W\vert x y)
(forma...
...+~+A at position \verb+~+A \verb+~+A\verb+\+n'' \vert W\vert x y)))
\end{scheme}


\begin{note}
Usage of verticals bars for the \texttt{W} symbol is necessary her...
...was
reported, whereas \texttt{w} is the width field from the event.
\end{note}