From adf7d3a8749e306916f082648f190b1f378a4220 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Mon, 9 Oct 2000 11:12:06 +0000 Subject: [PATCH] (tool-bar-mode): Check whether tool-bar-map has been initialized before calling tool-bar-setup. --- lisp/ChangeLog | 5 +++++ lisp/toolbar/tool-bar.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 539faf2e012..d42edba344e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-10-09 Dave Love + + * 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 * menu-bar.el (send-mail-item-name): New function. 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) -- 2.39.2