[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-commit] emacs/lisp/mh-e mh-init.el ChangeLog
From: |
Bill Wohler |
Subject: |
[Emacs-commit] emacs/lisp/mh-e mh-init.el ChangeLog |
Date: |
Mon, 17 Oct 2005 01:52:53 -0400 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch:
Changes by: Bill Wohler <address@hidden> 05/10/17 05:52:53
Modified files:
lisp/mh-e : mh-init.el ChangeLog
Log message:
(mh-image-load-path): Use locate-library to find MH-E. This simplified
the code a lot. Flattened out nested statements even more.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/mh-e/mh-init.el.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/mh-e/ChangeLog.diff?tr1=1.41&tr2=1.42&r1=text&r2=text
Patches:
Index: emacs/lisp/mh-e/ChangeLog
diff -u emacs/lisp/mh-e/ChangeLog:1.41 emacs/lisp/mh-e/ChangeLog:1.42
--- emacs/lisp/mh-e/ChangeLog:1.41 Sun Oct 16 20:42:38 2005
+++ emacs/lisp/mh-e/ChangeLog Mon Oct 17 05:52:53 2005
@@ -1,3 +1,9 @@
+2005-10-16 Bill Wohler <address@hidden>
+
+ * mh-init.el (mh-image-load-path): Use locate-library to find
+ MH-E. This simplified the code a lot. Flattened out nested
+ statements even more.
+
2005-10-16 Satyaki Das <address@hidden>
* mh-init.el (mh-image-load-path): Remove use of pushnew since it
Index: emacs/lisp/mh-e/mh-init.el
diff -u emacs/lisp/mh-e/mh-init.el:1.11 emacs/lisp/mh-e/mh-init.el:1.12
--- emacs/lisp/mh-e/mh-init.el:1.11 Sun Oct 16 20:42:39 2005
+++ emacs/lisp/mh-e/mh-init.el Mon Oct 17 05:52:53 2005
@@ -300,14 +300,6 @@
(add-to-list 'mh-variants variant)))))
mh-variants)))
-;;; XXX The two calls to message in this function should really be calls to
-;;; error. However, when this function is compiled via the top-level call in
-;;; mh-customize.el, it is actually called, and in a compile environment, the
-;;; errors are triggered which botches the compile. As a workaround, the calls
-;;; to error have been changed to calls to message, and code following was
-;;; inserted as an else clause. This is not robust, so if you can fix this,
-;;; please do!
-
(defvar mh-image-load-path-called-flag nil)
;;;###mh-autoload
@@ -317,30 +309,20 @@
`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."
- (message "mh-image-load-path called") ;XXX: for debugging
(unless mh-image-load-path-called-flag
- (let (mh-load-path mh-image-load-path)
+ (let (mh-library-name mh-image-load-path)
;; First, find mh-e in the load-path.
- (setq mh-load-path
- (loop for dir in load-path
- for dir-name = (directory-file-name dir)
- when (and (equal (file-name-nondirectory dir-name) "mh-e")
- (file-exists-p dir-name))
- return dir-name))
- (if mh-load-path
- (setq mh-image-load-path
- (expand-file-name (concat (file-name-directory mh-load-path)
- "../etc/images")))
- (error "Can not find mh-e in load-path"))
- (cond ((or (not mh-image-load-path)
- (not (file-exists-p mh-image-load-path)))
- (error "Can not find image directory %s"
- mh-image-load-path))
- ((boundp 'image-load-path)
- (unless (member mh-image-load-path image-load-path)
- (push mh-image-load-path image-load-path)))
- ((not (member mh-image-load-path load-path))
- (push mh-image-load-path 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)))
(provide 'mh-init)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-commit] emacs/lisp/mh-e mh-init.el ChangeLog,
Bill Wohler <=