From f4baae0103bf6579576d1a0eaea8dee8ef1118c8 Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 20 Dec 2006 17:21:23 +0000 Subject: [PATCH] (install-get-default-package-directory): New function. --- install.el | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/install.el b/install.el index 10b3a38..3d5bae0 100644 --- a/install.el +++ b/install.el @@ -1,8 +1,9 @@ ;;; install.el --- Emacs Lisp package install utility -;; Copyright (C) 1996,1997,1998,1999,2001 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006 +;; Free Software Foundation, Inc. -;; Author: MORIOKA Tomohiko +;; Author: MORIOKA Tomohiko ;; Created: 1996/08/18 ;; Keywords: install, byte-compile, directory detection @@ -226,6 +227,32 @@ ;;; @ for XEmacs package system ;;; +(defun install-get-default-package-directory () + (let ((dirs (append + (cond + ((boundp 'early-package-hierarchies) + (append (if early-package-load-path + early-package-hierarchies) + (if late-package-load-path + late-package-hierarchies) + (if last-package-load-path + last-package-hierarchies)) ) + ((boundp 'early-packages) + (append (if early-package-load-path + early-packages) + (if late-package-load-path + late-packages) + (if last-package-load-path + last-packages)) )) + (if (and (boundp 'configure-package-path) + (listp configure-package-path)) + (delete "" configure-package-path)))) + dir) + (while (and (setq dir (car dirs)) + (not (file-exists-p dir))) + (setq dirs (cdr dirs))) + dir)) + (defun install-update-package-files (package dir &optional just-print) (cond (just-print -- 1.7.10.4