Update for the new CVS server.
[elisp/emh.git] / EMH-CFG
diff --git a/EMH-CFG b/EMH-CFG
index 4df3e2c..461b704 100644 (file)
--- a/EMH-CFG
+++ b/EMH-CFG
@@ -1,25 +1,37 @@
 ;;; -*-Emacs-Lisp-*-
-;;;
-;;; $Id: EMH-CFG,v 0.3 1997-11-15 15:22:38 morioka Exp $
-;;;
+
+;; EMH-CFG: installation setting about EMH.
+
+;;; Code:
 
 (defvar default-load-path load-path)
 
-(cond ((boundp 'LISPDIR)
-       (add-to-list 'default-load-path LISPDIR)
-       (add-to-list 'load-path LISPDIR)
-       (add-to-list 'load-path (expand-file-name "apel" LISPDIR))
-       )
-      (t
-       (add-to-list 'load-path
-                   (expand-file-name "../../site-lisp/apel" data-directory))
-       ))
+(add-to-list 'load-path
+            (expand-file-name "../../site-lisp/apel" data-directory))
+(add-to-list 'load-path
+            (expand-file-name "." data-directory))
+
+(if (boundp 'LISPDIR)
+    (progn
+      (add-to-list 'default-load-path LISPDIR)
+      (add-to-list 'load-path LISPDIR)
+      (add-to-list 'load-path (expand-file-name "apel" LISPDIR))
+      ))
 
-(require 'install)
+(defvar VERSION_SPECIFIC_LISPDIR nil)
 
-(add-path "mel")
+(if VERSION_SPECIFIC_LISPDIR
+    (add-to-list 'load-path VERSION_SPECIFIC_LISPDIR))
+
+(condition-case nil
+    (require 'install)
+  (error (error "Please install APEL 8.2 or later.")))
+
+(add-latest-path "custom")
+(add-path "flim")
 (add-path "semi")
-(add-path ".")
+
+(add-to-list 'load-path (expand-file-name "."))
 
 
 ;;; @ Please specify prefix of install directory.
 (defvar PREFIX install-prefix)
 ;;(setq PREFIX "~/")
 
+(defvar PACKAGEDIR
+  (if (boundp 'early-packages)
+      (let ((dirs (append (if early-package-load-path
+                             early-packages)
+                         (if late-package-load-path
+                             late-packages)
+                         (if last-package-load-path
+                             last-packages)))
+           dir)
+       (while (not (file-exists-p
+                    (setq dir (car dirs))))
+         (setq dirs (cdr dirs)))
+       dir)))
+
 ;; Please specify prefix for ``emh'' [optional]
-(setq EMH_PREFIX "semi")
+(setq EMH_PREFIX
+      (if PACKAGEDIR
+         "emh"
+       "semi"))
 
 \f