]> git.eshelyaron.com Git - emacs.git/commitdiff
(tool-bar-mode): Check whether tool-bar-map
authorDave Love <fx@gnu.org>
Mon, 9 Oct 2000 11:12:06 +0000 (11:12 +0000)
committerDave Love <fx@gnu.org>
Mon, 9 Oct 2000 11:12:06 +0000 (11:12 +0000)
has been initialized before calling tool-bar-setup.

lisp/ChangeLog
lisp/toolbar/tool-bar.el

index 539faf2e01240f538635185351eb915ffe5c38ec..d42edba344eba7896c7558f7fd6d5492ad899697 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-09  Dave Love  <fx@gnu.org>
+
+       * toolbar/tool-bar.el (tool-bar-mode): Check whether tool-bar-map
+       has been initialized before calling tool-bar-setup.
+
 2000-10-09  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * menu-bar.el (send-mail-item-name): New function.
index f89819910600f9d25edecce457ed2993ad2caab5..f22f5796be6b3c31eebf2e86b565f0656ed08592 100644 (file)
@@ -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 @@ conveniently adding tool bar items."
       (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)