The function
pane-has-focus-p
is the predicate for whether
pane
currently has the input focus.
Note: On Motif,
pane-has-focus-p
cannot be used in menu functions such as the
enabled-function
or
popup-callback
of a menu item. It will always return
nil,
because the focus is on the menu button when the user clicks on it.