From: tomo Date: Sun, 21 Mar 2004 14:25:17 +0000 (+0000) Subject: Modify method to set up load-path. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9184572df94aaed5a119b75a4e7aff23846f5b88;p=elisp%2Fnabe.git Modify method to set up load-path. (default-load-path): New variable. (PACKAGEDIR): New variable. --- diff --git a/NABE-CFG b/NABE-CFG index 7db4b96..3f24b48 100644 --- a/NABE-CFG +++ b/NABE-CFG @@ -1,19 +1,25 @@ ;;; -*-Emacs-Lisp-*- -;;; -;;; $Id: NABE-CFG,v 0.4 1997/02/28 04:14:50 tmorioka Exp morioka $ -;;; -(setq load-path (append - (mapcar (function - (lambda (path) - (expand-file-name path (getenv "PWD")) - )) - '("." "../apel" "../emu") - ) - load-path)) +;; NABE-CFG: installation setting about NABE. + +;;; 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)) + )) (require 'install) +(add-to-list 'load-path default-directory) + ;;; @ Please specify prefix of install directory. ;;; @@ -38,4 +44,18 @@ (setq NABE_DIR (expand-file-name NABE_PREFIX LISPDIR)) +(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))) + ;;; NABE-CFG ends here