diff lisp/toolbar.el @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 501cfd01ee6d
children 697ef44129c6
line wrap: on
line diff
--- a/lisp/toolbar.el	Mon Aug 13 11:18:12 2007 +0200
+++ b/lisp/toolbar.el	Mon Aug 13 11:19:21 2007 +0200
@@ -123,6 +123,9 @@
 (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 @@
 	  (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.