Commit e1144ff6 authored by Peter Galbraith's avatar Peter Galbraith
Browse files

(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.
parent f169fdd3
2006-02-03 Peter Galbraith <psg@debian.org>
* 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 <mdb@gnu.org> 2006-02-03 Mark D. Baushke <mdb@gnu.org>
* mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar * mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar
......
...@@ -81,6 +81,11 @@ used in lieu of `search' in the CL package." ...@@ -81,6 +81,11 @@ used in lieu of `search' in the CL package."
"Delete the next LINES lines." "Delete the next LINES lines."
(delete-region (point) (progn (forward-line lines) (point)))) (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) (defvar mh-image-load-path-called-flag nil)
;;;###mh-autoload ;;;###mh-autoload
...@@ -92,14 +97,16 @@ files in \"lisp/mh-e\". If `image-load-path' exists (since Emacs ...@@ -92,14 +97,16 @@ files in \"lisp/mh-e\". If `image-load-path' exists (since Emacs
there. Otherwise, the images directory is added to the there. Otherwise, the images directory is added to the
`load-path' if it isn't already there." `load-path' if it isn't already there."
(unless mh-image-load-path-called-flag (unless mh-image-load-path-called-flag
(let (mh-library-name mh-image-load-path) (let (mh-library-name)
;; First, find mh-e in the load-path. (when (or (not mh-image-load-path)
(setq mh-library-name (locate-library "mh-e")) (not (file-exists-p mh-image-load-path)))
(if (not mh-library-name) ;; First, find mh-e in the load-path.
(error "Can not find MH-E in load-path")) (setq mh-library-name (locate-library "mh-e"))
(setq mh-image-load-path (if (not mh-library-name)
(expand-file-name (concat (file-name-directory mh-library-name) (error "Can not find MH-E in load-path"))
"../../etc/images"))) (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)) (if (not (file-exists-p mh-image-load-path))
(error "Can not find image directory %s" mh-image-load-path)) (error "Can not find image directory %s" mh-image-load-path))
(if (boundp 'image-load-path) (if (boundp 'image-load-path)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment