;;; path-util.el --- Emacs Lisp file detection utility
-;; Copyright (C) 1996,1997,1999 Free Software Foundation, Inc.
+;; Copyright (C) 1996,1997,1999,2000,2002 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <tomo@m17n.org>
;; Keywords: file detection, install, module
;;; Code:
+;; (require 'poe)
+
(defvar default-load-path load-path
"*Base of `load-path'.
It is used as default value of target path to search file or
You can use following PATH styles:
load-path relative: \"PATH/\"
- (it is searched from `defaul-load-path')
+ (it is searched from `default-load-path')
home directory relative: \"~/PATH/\" \"~USER/PATH/\"
absolute path: \"/HOO/BAR/BAZ/\"
(while rest
(setq p (expand-file-name path (car rest)))
(if (file-directory-p p)
- (throw 'tag p)
- )
- (setq rest (cdr rest))
- ))
- (not (member p load-path))
- )
+ (throw 'tag p))
+ (setq rest (cdr rest))))
+ (not (or (member p load-path)
+ (if (string-match "/$" p)
+ (member (substring p 0 (1- (length p))) load-path)
+ (member (file-name-as-directory p) load-path)))))
(setq load-path
(if (memq 'append options)
(append load-path (list p))
- (cons p load-path)
- ))
- )))
+ (cons p load-path))))))
;;;###autoload
(defun add-latest-path (pattern &optional all-paths)