From 6827d7e18220554c0e610ec1e3fd70137dfc90c3 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 9 Jul 2001 23:52:46 +0000 Subject: [PATCH] * dgnushack.el: Add the parent directory of the directory where the APEL modules are installed to `load-path' according to the description of the file Mule23@1934. --- ChangeLog | 6 ++++++ lisp/dgnushack.el | 51 ++++++++++++++++++++++++++++----------------------- 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index d88dfbd..50eff52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-07-09 Katsumi Yamaoka + + * lisp/dgnushack.el: Add the parent directory of the directory + where the APEL modules are installed to `load-path' according to + the description of the file Mule23@1934. + 2001-07-04 Yair Friedman * make.bat: Use infohack.el to create info files. diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index d10d7ff..5cb8b8e 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -169,31 +169,36 @@ to the specified name LIBRARY (a la calling `load' instead of `load-library')." ;; Don't load path-util until `char-after' and `char-before' have been ;; optimized because it requires `poe' and then modify the functions. -;; If the APEL modules are installed under the directory -;; "/usr/local/share/mule/site-lisp/apel/", the parent directory -;; "/usr/local/share/mule/site-lisp/" should be included in the -;; standard `load-path' or added by the configure option -;; "--with-addpath=". And also the directory where the EMU modules -;; are installed (e.g. "/usr/local/share/mule/19.34/site-lisp/") -;; should be included in the standard `load-path' or added by the -;; configure option "--with-addpath=". -(condition-case nil - (require 'path-util) - (error - (let ((path (locate-library "apel/path-util"))) - (if path - (progn - (when (string-match "/$" (setq path (file-name-directory path))) - (setq path (substring path 0 (match-beginning 0)))) - (unless (or (member path load-path) - (member (file-name-as-directory path) load-path)) - (push path load-path)) - (require 'path-util)) - (error " -APEL modules does not found in %s. +;; If the APEL modules are installed under the non-standard directory, +;; for example "/var/home/john/lisp/apel-VERSION/", you should add that +;; name using the configure option "--with-addpath=". +;; And also the directory where the EMU modules are installed, for +;; example "/usr/local/share/mule/19.34/site-lisp/", it should be +;; included in the standard `load-path' or added by the configure +;; option "--with-addpath=". +(let ((path (or (locate-library "path-util") + (locate-library "apel/path-util"))));; backward compat. + (if path + (progn + (when (string-match "/$" (setq path (file-name-directory path))) + (setq path (substring path 0 (match-beginning 0)))) + ;; path == "/var/home/john/lisp/apel-VERSION" + (unless (or (member path load-path) + (member (file-name-as-directory path) load-path)) + (push path load-path)) + (when (string-match "/$" (setq path (file-name-directory path))) + (setq path (substring path 0 (match-beginning 0)))) + ;; path == "/var/home/john/lisp" + (unless (or (member path load-path) + (member (file-name-as-directory path) load-path)) + (push path (cdr load-path))) + (require 'path-util)) + (error " +APEL modules are not found in %s. Try to re-configure with --with-addpath=APEL_PATH and run make again. " - load-path))))) + load-path))) + (unless (locate-library "mel") (add-path "flim")) (unless (module-installed-p 'mel) -- 1.7.10.4