]> git.eshelyaron.com Git - emacs.git/commitdiff
* gnus-group.el (gnus-group-make-tool-bar): Load tool-bar first.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 2 Apr 2002 20:24:32 +0000 (20:24 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 2 Apr 2002 20:24:32 +0000 (20:24 +0000)
* message.el (message-tool-bar-map): Ditto.

* gnus-sum.el (gnus-summary-make-tool-bar): Ditto.

lisp/gnus/ChangeLog
lisp/gnus/gnus-group.el
lisp/gnus/gnus-sum.el
lisp/gnus/message.el

index 2cbae6ecc6b04e8bd457c1b2eef9837c231eb4c6..ec62fc26e8cb0a0bbf5f8be20ec6f125fc40ad95 100644 (file)
@@ -1,3 +1,11 @@
+2002-04-02  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * 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.
+
 2002-04-01  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * nnwarchive.el (nnwarchive-mail-archive-article): Fix typo.
index b1473692e4ad283dc0417300e58a531339441010..e0f7b5cd1cf1e1e46df448d5c3d657acc6445a8a 100644 (file)
@@ -822,9 +822,11 @@ For example:
 
 ;; Emacs 21 tool bar.  Should be no-op otherwise.
 (defun gnus-group-make-tool-bar ()
-  (if (and (fboundp 'tool-bar-add-item-from-menu)
-          (default-value 'tool-bar-mode)
-          (not gnus-group-toolbar-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-group-toolbar-map))
       (setq gnus-group-toolbar-map
            (let ((tool-bar-map (make-sparse-keymap)))
              (tool-bar-add-item-from-menu
index c1d781aed8262cd8b21dcd2d60b38390cd6a2365..5ce4dd6ad2fee920fd64a45bad034615b2fd7ac1 100644 (file)
@@ -2010,10 +2010,15 @@ increase the score of each group you read."
 (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
index f79633e7fd1e0a4316e15d980c1d4130b148e4e4..2ad402cb88d4900371b65f622b933286d124d9a8 100644 (file)
@@ -4491,8 +4491,10 @@ which specify the range to operate on."
 (eval-when-compile (defvar tool-bar-map))
 (if (featurep 'xemacs)
     (require 'messagexmas)
-  (when (and (fboundp 'tool-bar-add-item-from-menu)
-            tool-bar-mode)
+  (when (and 
+        (condition-case nil (require 'tool-bar) (error nil))
+        (fboundp 'tool-bar-add-item-from-menu)
+        tool-bar-mode)
     (defvar message-tool-bar-map
       (let ((tool-bar-map (copy-keymap tool-bar-map)))
        ;; Zap some items which aren't so relevant and take up space.