changeset 32331:d1c0cf83e365

(tool-bar-mode): Check whether tool-bar-map has been initialized before calling tool-bar-setup.
author Dave Love <fx@gnu.org>
date Mon, 09 Oct 2000 11:11:32 +0000
parents 7980c067a12b
children 70f7c8ff11ff
files lisp/toolbar/tool-bar.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/toolbar/tool-bar.el	Mon Oct 09 10:28:16 2000 +0000
+++ b/lisp/toolbar/tool-bar.el	Mon Oct 09 11:11:32 2000 +0000
@@ -36,6 +36,8 @@
 ;; global bar in modes which have `special' as their `mode-class'
 ;; properlty.)
 
+;; Todo: Somehow make tool bars easily customizable by the naive?
+
 ;;; Code:
 
 ;;;###autoload
@@ -60,7 +62,9 @@
       (if elt
 	  (setcdr elt lines)
 	(add-to-list 'default-frame-alist (cons 'tool-bar-lines lines)))))
-  (if (and tool-bar-mode (display-graphic-p))
+  (if (and tool-bar-mode
+	   (display-graphic-p)
+	   (= 1 (length (default-value 'tool-bar-map)))) ; not yet setup
       (tool-bar-setup)))
 
 (defvar tool-bar-map (make-sparse-keymap)