From adf7d3a8749e306916f082648f190b1f378a4220 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Mon, 9 Oct 2000 11:12:06 +0000 Subject: (tool-bar-mode): Check whether tool-bar-map has been initialized before calling tool-bar-setup. --- lisp/toolbar/tool-bar.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp/toolbar') diff --git a/lisp/toolbar/tool-bar.el b/lisp/toolbar/tool-bar.el index f8981991060..f22f5796be6 100644 --- a/lisp/toolbar/tool-bar.el +++ b/lisp/toolbar/tool-bar.el @@ -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) -- cgit v1.2.1