From: yamaoka Date: Thu, 9 Nov 2000 11:31:18 +0000 (+0000) Subject: * path-util.el (add-path): Check for both "path" and "path/". X-Git-Tag: apel-10_3~48 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f601b82c55f8002e6c1044193d10041f62792f2a;p=elisp%2Fapel.git * path-util.el (add-path): Check for both "path" and "path/". --- diff --git a/ChangeLog b/ChangeLog index 4604dba..28493d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-11-09 Katsumi Yamaoka + + * path-util.el (add-path): Check for both "path" and "path/". + 2000-10-06 Shuhei KOBAYASHI * poe.el (require): Update `current-load-list'. diff --git a/path-util.el b/path-util.el index d774642..db87fc7 100644 --- a/path-util.el +++ b/path-util.el @@ -54,18 +54,16 @@ You can specify following OPTIONS: (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)