diff options
author | Dave Love <fx@gnu.org> | 2000-10-09 11:12:06 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2000-10-09 11:12:06 +0000 |
commit | adf7d3a8749e306916f082648f190b1f378a4220 (patch) | |
tree | 593c5c3c3d867509c8884ca0e3fa6a8649345894 /lisp/toolbar | |
parent | e4ca8f8c2e22decdd215f3738ecf8fd8f532ec52 (diff) | |
download | emacs-adf7d3a8749e306916f082648f190b1f378a4220.tar.gz |
(tool-bar-mode): Check whether tool-bar-map
has been initialized before calling tool-bar-setup.
Diffstat (limited to 'lisp/toolbar')
-rw-r--r-- | lisp/toolbar/tool-bar.el | 6 |
1 files changed, 5 insertions, 1 deletions
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) |