X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ftoolbar.el;h=f92b04429f3208d2fe23ca7d0ea11311f1a44086;hb=c7c61809b500673dbba481f302d995228f6fb1ce;hp=74d44e7c030ae1c216496d57c808d88dfb37f338;hpb=e5cd8d4ed475af329be5df9627a53edd584fd3de;p=chise%2Fxemacs-chise.git- diff --git a/lisp/toolbar.el b/lisp/toolbar.el index 74d44e7..f92b044 100644 --- a/lisp/toolbar.el +++ b/lisp/toolbar.el @@ -123,6 +123,9 @@ customized through the options menu." (defvar last-pressed-toolbar-button nil) (defvar toolbar-active nil) +(defvar toolbar-blank-press-function nil + "Function to call if a blank area of the toolbar is pressed.") + ;; ;; It really sucks that we also have to tie onto ;; default-mouse-motion-handler to make sliding buttons work right. @@ -143,9 +146,8 @@ an argument if press is over a blank area of the toolbar." (setq last-pressed-toolbar-button button)) ;; Added by Bob Weiner, Motorola Inc., 10/6/95, to handle ;; presses on blank portions of toolbars. - (and (boundp 'toolbar-blank-press-function) - (functionp toolbar-blank-press-function) - (funcall toolbar-blank-press-function event))))) + (when (functionp toolbar-blank-press-function) + (funcall toolbar-blank-press-function event))))) (defun release-and-activate-toolbar-button (event) "Release a toolbar button and activate its callback.