]> git.eshelyaron.com Git - emacs.git/commitdiff
* mh-compat.el (mh-image-load-path-for-library): Fix example by not
authorBill Wohler <wohler@newt.com>
Wed, 15 Mar 2006 17:03:58 +0000 (17:03 +0000)
committerBill Wohler <wohler@newt.com>
Wed, 15 Mar 2006 17:03:58 +0000 (17:03 +0000)
recommending that one binds image-load-path. Just defvar it to placate
compiler and only use it if previously defined.

* mh-e.el (image-load-path): Don't bind!

* mh-folder.el (mh-folder-mode): Only use image-load-path if
previously defined.

* mh-letter.el (mh-letter-mode): Ditto.

* mh-utils.el (mh-logo-display): Ditto.

lisp/mh-e/ChangeLog
lisp/mh-e/mh-compat.el
lisp/mh-e/mh-e.el
lisp/mh-e/mh-folder.el
lisp/mh-e/mh-letter.el
lisp/mh-e/mh-utils.el

index ecdf207d25250145a12b41fac6a2bf983fc86c5a..0398d79b9227f21e68675a8fe4592bcbe60ad458 100644 (file)
@@ -1,3 +1,18 @@
+2006-03-15  Bill Wohler  <wohler@newt.com>
+
+       * mh-compat.el (mh-image-load-path-for-library): Fix example by
+       not recommending that one binds image-load-path. Just defvar it to
+       placate compiler and only use it if previously defined.
+
+       * mh-e.el (image-load-path): Don't bind!
+
+       * mh-folder.el (mh-folder-mode): Only use image-load-path if
+       previously defined.
+
+       * mh-letter.el (mh-letter-mode): Ditto.
+
+       * mh-utils.el (mh-logo-display): Ditto.
+
 2006-03-14  Bill Wohler  <wohler@newt.com>
 
        * mh-compat.el (mh-image-load-path-for-library): Incorporate
index 50542d67f4e1232c5e21aa4f5769e90397cd9850..d4da371bffc01c201419f7810c86ded1f27d0d39 100644 (file)
@@ -137,11 +137,13 @@ Here is an example that uses a common idiom to provide
 compatibility with versions of Emacs that lack the variable
 `image-load-path':
 
-    ;; Avoid errors on Emacsen without `image-load-path'.
-    (if (not (boundp 'image-load-path)) (defvar image-load-path nil))
+    ;; Shush compiler.
+    (defvar image-load-path)
 
     (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
-           (image-load-path (cons (car load-path) image-load-path)))
+           (image-load-path (cons (car load-path)
+                                  (when (boundp 'image-load-path)
+                                    image-load-path))))
       (mh-tool-bar-folder-buttons-init))"
   (unless library (error "No library specified"))
   (unless image   (error "No image specified"))
index 2f29a678f135eaab68a4ecb007aaef2900440720..0b8961470a7322dab54df8c0e72956a86acc9820 100644 (file)
@@ -325,9 +325,6 @@ Name of the Previous sequence.")
 
 ;; Etc. (alphabetical)
 
-;; Avoid errors on Emacsen without image-load-path.
-(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
-
 (defvar mh-flists-present-flag nil
   "Non-nil means that we have \"flists\".")
 
index 2c32d1433f11d8416a63a518f9e79ac4a5241b28..b1b8c7d859cc7d2d904a5a39a1166185070c4b0d 100644 (file)
@@ -525,6 +525,7 @@ font-lock is done highlighting.")
 (eval-when-compile
   (defvar desktop-save-buffer)
   (defvar font-lock-auto-fontify)
+  (defvar image-load-path)
   (mh-do-in-xemacs (defvar font-lock-defaults)))
 
 (defvar mh-folder-buttons-init-flag nil)
@@ -592,7 +593,9 @@ perform the operation on all messages in that region.
   (mh-do-in-gnu-emacs
     (unless mh-folder-buttons-init-flag
       (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
-             (image-load-path (cons (car load-path) image-load-path)))
+             (image-load-path (cons (car load-path)
+                                    (when (boundp 'image-load-path)
+                                      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))
index a7290cf5ae9fceee02176dce0f730273333a1864..024c1875eac31c723261fa37c7d67bbdba352fd4 100644 (file)
@@ -278,7 +278,9 @@ searching for `mh-mail-header-separator' in the buffer."
 (defvar mh-letter-buttons-init-flag nil)
 
 ;; Shush compiler.
-(eval-when-compile (mh-do-in-xemacs (defvar font-lock-defaults)))
+(eval-when-compile
+  (defvar image-load-path)
+  (mh-do-in-xemacs (defvar font-lock-defaults)))
 
 ;; Ensure new buffers won't get this mode if default-major-mode is nil.
 (put 'mh-letter-mode 'mode-class 'special)
@@ -314,7 +316,9 @@ order).
   (mh-do-in-gnu-emacs
     (unless mh-letter-buttons-init-flag
       (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
-             (image-load-path (cons (car load-path) image-load-path)))
+             (image-load-path (cons (car load-path)
+                                    (when (boundp 'image-load-path)
+                                      image-load-path))))
         (mh-tool-bar-letter-buttons-init)
         (setq mh-letter-buttons-init-flag t)))
     (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))
index 44e15f3cb19b127335a730f4ded88565f83f0ec6..e41ee0bcc4f622fc07aebb2d06567a2bd88f0812 100644 (file)
@@ -127,12 +127,17 @@ Ignores case when searching for OLD."
 
 (defvar mh-logo-cache nil)
 
+;; Shush compiler.
+(defvar image-load-path)
+
 ;;;###mh-autoload
 (defun mh-logo-display ()
   "Modify mode line to display MH-E logo."
   (mh-do-in-gnu-emacs
     (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
-           (image-load-path (cons (car load-path) image-load-path)))
+           (image-load-path (cons (car load-path)
+                                  (when (boundp 'image-load-path)
+                                    image-load-path))))
       (add-text-properties
        0 2
        `(display ,(or mh-logo-cache