diff lisp/mh-e/mh-show.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 4cb528cc4c04
children 0e0916499a15
line wrap: on
line diff
--- a/lisp/mh-e/mh-show.el	Thu Mar 02 22:34:58 2006 +0000
+++ b/lisp/mh-e/mh-show.el	Fri Mar 03 00:27:49 2006 +0000
@@ -36,6 +36,9 @@
 (require 'mh-e)
 (require 'mh-scan)
 
+;; Dynamically-created function not found in mh-loaddefs.el.
+(autoload 'mh-tool-bar-init "mh-tool-bar")
+
 (require 'font-lock)
 (require 'gnus-cite)
 (require 'gnus-util)
@@ -830,6 +833,10 @@
 See also `mh-folder-mode'.
 
 \\{mh-show-mode-map}"
+  (mh-do-in-gnu-emacs
+    (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map))
+  (mh-do-in-xemacs
+    (mh-tool-bar-init :show))
   (set (make-local-variable 'mail-header-separator) mh-mail-header-separator)
   (setq paragraph-start (default-value 'paragraph-start))
   (mh-show-unquote-From)
@@ -853,8 +860,6 @@
   (if (and mh-xemacs-flag
            font-lock-auto-fontify)
       (turn-on-font-lock))
-  (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map)
-  (mh-funcall-if-exists mh-tool-bar-init :show)
   (when mh-decode-mime-flag
     (mh-make-local-hook 'kill-buffer-hook)
     (add-hook 'kill-buffer-hook 'mh-mime-cleanup nil t))