# HG changeset patch # User Peter Galbraith # Date 1138998455 0 # Node ID 164eb9d4f12420f5a57c09c919fd6a7675aee983 # Parent 04d228a1b5c8d34023de12ff4d476cf1a5df710b (mh-image-load-path): New variable to optionally hold the directory where MH-E images are stored. If nil, then the function `mh-image-load-path' will find it. This variable will be used for Debian packaging. (mh-image-load-path function): Use variable `mh-image-load-path' if non-nil and exists. diff -r 04d228a1b5c8 -r 164eb9d4f124 lisp/mh-e/ChangeLog --- a/lisp/mh-e/ChangeLog Fri Feb 03 19:32:06 2006 +0000 +++ b/lisp/mh-e/ChangeLog Fri Feb 03 20:27:35 2006 +0000 @@ -1,3 +1,12 @@ +2006-02-03 Peter Galbraith + + * mh-utils.el (mh-image-load-path): New variable to optionally + hold the directory where MH-E images are stored. If nil, then + the function `mh-image-load-path' will find it. This variable + will be used for Debian packaging. + (mh-image-load-path function): Use variable `mh-image-load-path' + if non-nil and exists. + 2006-02-03 Mark D. Baushke * mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar diff -r 04d228a1b5c8 -r 164eb9d4f124 lisp/mh-e/mh-utils.el --- a/lisp/mh-e/mh-utils.el Fri Feb 03 19:32:06 2006 +0000 +++ b/lisp/mh-e/mh-utils.el Fri Feb 03 20:27:35 2006 +0000 @@ -81,6 +81,11 @@ "Delete the next LINES lines." (delete-region (point) (progn (forward-line lines) (point)))) +(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) ;;;###mh-autoload @@ -92,14 +97,16 @@ there. Otherwise, the images directory is added to the `load-path' if it isn't already there." (unless mh-image-load-path-called-flag - (let (mh-library-name 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"))) + (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)