From: Dave Love Date: Mon, 9 Oct 2000 11:12:06 +0000 (+0000) Subject: (tool-bar-mode): Check whether tool-bar-map X-Git-Tag: emacs-pretest-21.0.90~1005 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=adf7d3a8749e306916f082648f190b1f378a4220;p=emacs.git (tool-bar-mode): Check whether tool-bar-map has been initialized before calling tool-bar-setup. --- 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)