Mercurial > emacs
diff lisp/gnus/gnus-sum.el @ 44344:37801f2191c3
* gnus-group.el (gnus-group-make-tool-bar): Load tool-bar first.
* message.el (message-tool-bar-map): Ditto.
* gnus-sum.el (gnus-summary-make-tool-bar): Ditto.
author | ShengHuo ZHU <zsh@cs.rochester.edu> |
---|---|
date | Tue, 02 Apr 2002 20:24:32 +0000 |
parents | 5fe3e0ee7fd7 |
children | d0bf98f4584b |
line wrap: on
line diff
--- a/lisp/gnus/gnus-sum.el Tue Apr 02 19:37:29 2002 +0000 +++ b/lisp/gnus/gnus-sum.el Tue Apr 02 20:24:32 2002 +0000 @@ -2010,10 +2010,15 @@ (defvar gnus-summary-tool-bar-map nil) ;; Emacs 21 tool bar. Should be no-op otherwise. +;; NB: A new function tool-bar-local-item-from-menu is added in Emacs +;; 21.2.50+. Considering many users use Emacs 21, use +;; tool-bar-add-item-from-menu here. (defun gnus-summary-make-tool-bar () - (if (and (fboundp 'tool-bar-add-item-from-menu) - (default-value 'tool-bar-mode) - (not gnus-summary-tool-bar-map)) + (if (and + (condition-case nil (require 'tool-bar) (error nil)) + (fboundp 'tool-bar-add-item-from-menu) + (default-value 'tool-bar-mode) + (not gnus-summary-tool-bar-map)) (setq gnus-summary-tool-bar-map (let ((tool-bar-map (make-sparse-keymap))) (tool-bar-add-item-from-menu