diff options
| author | Peter Galbraith | 2006-02-03 20:27:35 +0000 |
|---|---|---|
| committer | Peter Galbraith | 2006-02-03 20:27:35 +0000 |
| commit | e1144ff64efdbb4ffaeae341f1d9482d0f7cea49 (patch) | |
| tree | b1d0f51ee98ec17d131bbb558e052686f7a7281c | |
| parent | f169fdd35f6b8d074a2d5b3c650cc62e159ac027 (diff) | |
| download | emacs-e1144ff64efdbb4ffaeae341f1d9482d0f7cea49.tar.gz emacs-e1144ff64efdbb4ffaeae341f1d9482d0f7cea49.zip | |
(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.
| -rw-r--r-- | lisp/mh-e/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/mh-e/mh-utils.el | 23 |
2 files changed, 24 insertions, 8 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 85e4ddbfe6b..40517e61922 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2006-02-03 Peter Galbraith <psg@debian.org> | ||
| 2 | |||
| 3 | * mh-utils.el (mh-image-load-path): New variable to optionally | ||
| 4 | hold the directory where MH-E images are stored. If nil, then | ||
| 5 | the function `mh-image-load-path' will find it. This variable | ||
| 6 | will be used for Debian packaging. | ||
| 7 | (mh-image-load-path function): Use variable `mh-image-load-path' | ||
| 8 | if non-nil and exists. | ||
| 9 | |||
| 1 | 2006-02-03 Mark D. Baushke <mdb@gnu.org> | 10 | 2006-02-03 Mark D. Baushke <mdb@gnu.org> |
| 2 | 11 | ||
| 3 | * mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar | 12 | * mh-tool-bar.el: Add conditional require of 'tool-bar or 'toolbar |
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index e948860058f..54e293cc950 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -81,6 +81,11 @@ used in lieu of `search' in the CL package." | |||
| 81 | "Delete the next LINES lines." | 81 | "Delete the next LINES lines." |
| 82 | (delete-region (point) (progn (forward-line lines) (point)))) | 82 | (delete-region (point) (progn (forward-line lines) (point)))) |
| 83 | 83 | ||
| 84 | (defvar mh-image-load-path nil | ||
| 85 | "Directory where images for MH-E are found. | ||
| 86 | If nil, then the function mh-image-load-path will search in | ||
| 87 | ../../etc/images relative to the files in \"lisp/mh-e\".") | ||
| 88 | |||
| 84 | (defvar mh-image-load-path-called-flag nil) | 89 | (defvar mh-image-load-path-called-flag nil) |
| 85 | 90 | ||
| 86 | ;;;###mh-autoload | 91 | ;;;###mh-autoload |
| @@ -92,14 +97,16 @@ files in \"lisp/mh-e\". If `image-load-path' exists (since Emacs | |||
| 92 | there. Otherwise, the images directory is added to the | 97 | there. Otherwise, the images directory is added to the |
| 93 | `load-path' if it isn't already there." | 98 | `load-path' if it isn't already there." |
| 94 | (unless mh-image-load-path-called-flag | 99 | (unless mh-image-load-path-called-flag |
| 95 | (let (mh-library-name mh-image-load-path) | 100 | (let (mh-library-name) |
| 96 | ;; First, find mh-e in the load-path. | 101 | (when (or (not mh-image-load-path) |
| 97 | (setq mh-library-name (locate-library "mh-e")) | 102 | (not (file-exists-p mh-image-load-path))) |
| 98 | (if (not mh-library-name) | 103 | ;; First, find mh-e in the load-path. |
| 99 | (error "Can not find MH-E in load-path")) | 104 | (setq mh-library-name (locate-library "mh-e")) |
| 100 | (setq mh-image-load-path | 105 | (if (not mh-library-name) |
| 101 | (expand-file-name (concat (file-name-directory mh-library-name) | 106 | (error "Can not find MH-E in load-path")) |
| 102 | "../../etc/images"))) | 107 | (setq mh-image-load-path |
| 108 | (expand-file-name (concat (file-name-directory mh-library-name) | ||
| 109 | "../../etc/images")))) | ||
| 103 | (if (not (file-exists-p mh-image-load-path)) | 110 | (if (not (file-exists-p mh-image-load-path)) |
| 104 | (error "Can not find image directory %s" mh-image-load-path)) | 111 | (error "Can not find image directory %s" mh-image-load-path)) |
| 105 | (if (boundp 'image-load-path) | 112 | (if (boundp 'image-load-path) |