diff lisp/mh-e/mh-folder.el @ 69245:f3bbf5f32462

* mh-folder.el (mh-tool-bar-init): Autoload. (mh-folder-mode): Call mh-tool-bar-init conditionally in XEmacs. Set scoped variables image-load-path and load-path with updated mh-image-load-path before calling mh-tool-bar-folder-buttons-init. * mh-letter.el (mh-tool-bar-init): Autoload. (mh-letter-mode): Call mh-tool-bar-init conditionally in XEmacs. Set scoped variables image-load-path and load-path with updated mh-image-load-path before calling mh-tool-bar-letter-buttons-init. * mh-show.el (mh-tool-bar-init): Autoload. (mh-show-mode): Perform tool bar stuff conditionally in XEmacs and GNU Emacs. * mh-tool-bar.el (mh-tool-bar-define): Don't quote stuff in error messages per conventions. (mh-tool-bar-folder-buttons-init) (mh-tool-bar-letter-buttons-init): Don't call mh-image-load-path. (mh-tool-bar-define call): Format. * mh-utils.el (mh-image-directory, mh-image-load-path-called-flag): Delete. (mh-image-load-path): Incorporate changes from Gnus team. Biggest changes are that it no longer uses/sets mh-image-directory or mh-image-load-path-called-flag, and returns the updated path rather than change it. (mh-logo-display): Change usage of mh-image-load-path.
author Bill Wohler <wohler@newt.com>
date Fri, 03 Mar 2006 00:27:49 +0000
parents 7daec5f4a289
children b52e0cc8af61
line wrap: on
line diff
--- a/lisp/mh-e/mh-folder.el	Thu Mar 02 22:34:58 2006 +0000
+++ b/lisp/mh-e/mh-folder.el	Fri Mar 03 00:27:49 2006 +0000
@@ -36,8 +36,9 @@
 (require 'mh-scan)
 (mh-require-cl)
 
-;; Dynamically-created function not found in mh-loaddefs.el.
+;; Dynamically-created functions not found in mh-loaddefs.el.
 (autoload 'mh-tool-bar-folder-buttons-init "mh-tool-bar")
+(autoload 'mh-tool-bar-init "mh-tool-bar")
 
 (require 'gnus-util)
 (autoload 'message-fetch-field "message")
@@ -589,9 +590,16 @@
 
 \\{mh-folder-mode-map}"
   (mh-do-in-gnu-emacs
-   (unless mh-folder-buttons-init-flag
-     (mh-tool-bar-folder-buttons-init)
-     (setq mh-folder-buttons-init-flag t)))
+    (unless mh-folder-buttons-init-flag
+      (let ((load-path
+             (mh-image-load-path "mh-e" "mh-logo.xpm" 'load-path))
+            (image-load-path
+             (mh-image-load-path "mh-e" "mh-logo.xpm" 'image-load-path)))
+        (mh-tool-bar-folder-buttons-init)
+        (setq mh-folder-buttons-init-flag t)))
+    (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))
+  (mh-do-in-xemacs
+    (mh-tool-bar-init :folder))
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(mh-folder-font-lock-keywords t))
   (make-local-variable 'desktop-save-buffer)
@@ -652,8 +660,6 @@
   (easy-menu-add mh-folder-message-menu)
   (easy-menu-add mh-folder-folder-menu)
   (mh-inc-spool-make)
-  (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)
-  (mh-funcall-if-exists mh-tool-bar-init :folder)
   (mh-set-help mh-folder-mode-help-messages)
   (if (and mh-xemacs-flag
            font-lock-auto-fontify)