emacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-commit] emacs/lisp/mh-e mh-utils.el ChangeLog


From: Bill Wohler
Subject: [Emacs-commit] emacs/lisp/mh-e mh-utils.el ChangeLog
Date: Fri, 03 Feb 2006 23:02:51 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         
Changes by:     Bill Wohler <address@hidden>    06/02/03 23:02:51

Modified files:
        lisp/mh-e      : mh-utils.el ChangeLog 

Log message:
        (mh-image-load-path, mh-image-load-path-called-flag)
        (mh-image-load-path): Checkdoc fix. Docstring edits. Reduce scope of
        local variable mh-library-name.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/mh-utils.el.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/ChangeLog.diff?tr1=1.139&tr2=1.140&r1=text&r2=text

Patches:
Index: emacs/lisp/mh-e/ChangeLog
diff -u emacs/lisp/mh-e/ChangeLog:1.139 emacs/lisp/mh-e/ChangeLog:1.140
--- emacs/lisp/mh-e/ChangeLog:1.139     Fri Feb  3 22:17:59 2006
+++ emacs/lisp/mh-e/ChangeLog   Fri Feb  3 23:02:51 2006
@@ -1,5 +1,9 @@
 2006-02-03  Bill Wohler  <address@hidden>
 
+       * mh-utils.el (mh-image-load-path, mh-image-load-path-called-flag)
+       (mh-image-load-path): Checkdoc fix. Docstring edits. Reduce scope
+       of local variable mh-library-name.
+
        * mh-e.el (mh-folder-msg-number, mh-folder-refiled, mh-folder-to)
        (mh-show-cc, mh-show-date, mh-show-header): Replace (min-colors
        88) with (min-colors 64) in face specifications so that MH-E still
Index: emacs/lisp/mh-e/mh-utils.el
diff -u emacs/lisp/mh-e/mh-utils.el:1.47 emacs/lisp/mh-e/mh-utils.el:1.48
--- emacs/lisp/mh-e/mh-utils.el:1.47    Fri Feb  3 20:27:35 2006
+++ emacs/lisp/mh-e/mh-utils.el Fri Feb  3 23:02:51 2006
@@ -83,35 +83,47 @@
 
 (defvar mh-image-load-path nil
   "Directory where images for MH-E are found.
-If nil, then the function mh-image-load-path will search in
-../../etc/images relative to the files in \"lisp/mh-e\".")
-
-(defvar mh-image-load-path-called-flag nil)
+If nil, then the function `mh-image-load-path' will search for
+the images in \"../../etc/images\" relative to the files in
+\"lisp/mh-e\".")
+
+(defvar mh-image-load-path-called-flag nil
+  "Non-nil means that the function `mh-image-load-path' has been called.
+This variable is used by that function to avoid doing the work repeatedly.")
 
 ;;;###mh-autoload
 (defun mh-image-load-path ()
   "Ensure that the MH-E images are accessible by `find-image'.
-Images for MH-E are found in ../../etc/images relative to the
-files in \"lisp/mh-e\". If `image-load-path' exists (since Emacs
-22), then the images directory is added to it if isn't already
-there. Otherwise, the images directory is added to the
-`load-path' if it isn't already there."
+
+Images for MH-E are found in \"../../etc/images\" relative to the
+files in \"lisp/mh-e\". This function saves the actual location
+found in the variable `mh-image-load-path'. If the images on your
+system are actually located elsewhere, then set the variable
+`mh-image-load-path' before starting MH-E.
+
+If `image-load-path' exists (since Emacs 22), then the contents
+of the variable `mh-image-load-path' is added to it if isn't
+already there. Otherwise, the contents of the variable
+`mh-image-load-path' is added to the `load-path' if it isn't
+already there.
+
+See also variable `mh-image-load-path-called-flag'."
   (unless mh-image-load-path-called-flag
-    (let (mh-library-name)
-      (when (or (not mh-image-load-path)
-                (not (file-exists-p mh-image-load-path)))
-        ;; First, find mh-e in the load-path.
-        (setq mh-library-name (locate-library "mh-e"))
-        (if (not mh-library-name)
-            (error "Can not find MH-E in load-path"))
-        (setq mh-image-load-path
-              (expand-file-name (concat (file-name-directory mh-library-name)
-                                        "../../etc/images"))))
-      (if (not (file-exists-p mh-image-load-path))
-          (error "Can not find image directory %s" mh-image-load-path))
-      (if (boundp 'image-load-path)
-          (add-to-list 'image-load-path mh-image-load-path)
-        (add-to-list 'load-path mh-image-load-path)))
+    (if (or (not mh-image-load-path)
+            (not (file-exists-p mh-image-load-path)))
+        (let (mh-library-name)
+          ;; First, find mh-e in the load-path.
+          (setq mh-library-name (locate-library "mh-e"))
+          (if (not mh-library-name)
+              (error "Can not find MH-E in load-path"))
+          (setq mh-image-load-path
+                (expand-file-name (concat (file-name-directory mh-library-name)
+                                          "../../etc/images")))))
+    (if (not (file-exists-p mh-image-load-path))
+        (error "Can not find image directory %s" mh-image-load-path))
+    (if (boundp 'image-load-path)
+        (add-to-list 'image-load-path mh-image-load-path)
+      (add-to-list 'load-path mh-image-load-path))
     (setq mh-image-load-path-called-flag t)))
 
 ;;;###mh-autoload




reply via email to

[Prev in Thread] Current Thread [Next in Thread]