[Top][All Lists]
[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: |
Thu, 16 Feb 2006 18:32:15 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch:
Changes by: Bill Wohler <address@hidden> 06/02/16 18:32:15
Modified files:
lisp/mh-e : mh-utils.el ChangeLog
Log message:
(mh-image-load-path): The variables image-load-path or load-path would
not get updated if user set mh-image-load-path. Moved tests and
add-to-list calls outside of cond so they are applied consistently,
even if they are redundant in some circumstances. Efficiency isn't a
concern here. Made error messages more user-friendly.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/mh-utils.el.diff?tr1=1.50&tr2=1.51&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/emacs/emacs/lisp/mh-e/ChangeLog.diff?tr1=1.150&tr2=1.151&r1=text&r2=text
Patches:
Index: emacs/lisp/mh-e/ChangeLog
diff -u emacs/lisp/mh-e/ChangeLog:1.150 emacs/lisp/mh-e/ChangeLog:1.151
--- emacs/lisp/mh-e/ChangeLog:1.150 Thu Feb 16 02:14:40 2006
+++ emacs/lisp/mh-e/ChangeLog Thu Feb 16 18:32:15 2006
@@ -1,3 +1,12 @@
+2006-02-16 Bill Wohler <address@hidden>
+
+ * mh-utils.el (mh-image-load-path): The variables image-load-path
+ or load-path would not get updated if user set mh-image-load-path.
+ Moved tests and add-to-list calls outside of cond so they are
+ applied consistently, even if they are redundant in some
+ circumstances. Efficiency isn't a concern here. Made error
+ messages more user-friendly.
+
2006-02-15 Peter S Galbraith <address@hidden>
* mh-compat.el (mh-image-search-load-path): Compatibility code.
Index: emacs/lisp/mh-e/mh-utils.el
diff -u emacs/lisp/mh-e/mh-utils.el:1.50 emacs/lisp/mh-e/mh-utils.el:1.51
--- emacs/lisp/mh-e/mh-utils.el:1.50 Thu Feb 16 02:14:40 2006
+++ emacs/lisp/mh-e/mh-utils.el Thu Feb 16 18:32:15 2006
@@ -96,10 +96,11 @@
"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\". 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.
+files in \"lisp/mh-e\", in `image-load-path', or in `load-path'.
+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
@@ -110,40 +111,38 @@
See also variable `mh-image-load-path-called-flag'."
(unless mh-image-load-path-called-flag
(cond
- ((and mh-image-load-path
- (file-exists-p (expand-file-name "mh-logo.xpm"
- mh-image-load-path))))
- ;; User setting exists. We're done.
- ((and mh-image-load-path
- (not (file-exists-p (expand-file-name "mh-logo.xpm"
- mh-image-load-path))))
- ;; User setting does not exist.
- (message "Variable mh-image-load-path %s does not contain MH-E images"
- mh-image-load-path))
+ (mh-image-load-path) ; user setting exists; we're done
((mh-image-search-load-path "mh-logo.xpm")
- ;; Emacs 22 already knows where the images are.
+ ;; Images already in image-load-path.
(setq mh-image-load-path
(file-name-directory (mh-image-search-load-path "mh-logo.xpm"))))
((locate-library "mh-logo.xpm")
- ;; Other Emacs already knows where the images are...
+ ;; Images already in load-path.
(setq mh-image-load-path
(file-name-directory (locate-library "mh-logo.xpm"))))
- (t
+ (t
;; Guess `mh-image-load-path' if it wasn't provided by the user.
(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"))
+ ;; And then set mh-image-load-path relative to that.
(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))))
+ "../../etc/images"))))))
+ (if (not (file-exists-p mh-image-load-path))
+ (error "Directory %s in mh-image-load-path does not exist"
+ mh-image-load-path))
+ (if (not (file-exists-p
+ (expand-file-name "mh-logo.xpm" mh-image-load-path)))
+ (error "Directory %s in mh-image-load-path does not contain MH-E images"
+ 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