X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fpackage-admin.el;h=0dd306639da687eeb274021b674b0b9c0c48c928;hb=4974c0e6ccdb95ef770d142f72e3e7a14e07632f;hp=efa527aea869d307b15b717e09d1d3e721f5003b;hpb=79d2db7d65205bc85d471590726d0cf3af5598e0;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/package-admin.el b/lisp/package-admin.el index efa527a..0dd3066 100644 --- a/lisp/package-admin.el +++ b/lisp/package-admin.el @@ -173,14 +173,16 @@ Note: Type \"site\" is not yet fully supported." (let ((path-list (paths-decode-directory-path env-value 'drop-empties))) (cond ((eq type 'std) (while path-list - (if (equal (substring (car path-list) -16) - (concat "xemacs-packages" (char-to-string directory-sep-char))) + (if (equal (file-name-nondirectory + (directory-file-name (car path-list))) + "xemacs-packages") (setq top-dir (car path-list))) (setq path-list (cdr path-list)))) ((eq type 'mule) (while path-list - (if (equal (substring (car path-list) -14) - (concat "mule-packages" (char-to-string directory-sep-char))) + (if (equal (file-name-nondirectory + (directory-file-name (car path-list))) + "mule-packages") (setq top-dir (car path-list))) (setq path-list (cdr path-list))))))) ;; Wasn't in the environment, try `user-init-directory' if @@ -200,14 +202,16 @@ Note: Type \"site\" is not yet fully supported." (packages-compute-package-locations user-init-directory))))) (cond ((eq type 'std) (while path-list - (if (equal (substring (car path-list) -16) - (concat "xemacs-packages" (char-to-string directory-sep-char))) + (if (equal (file-name-nondirectory + (directory-file-name (car path-list))) + "xemacs-packages") (setq top-dir (car path-list))) (setq path-list (cdr path-list)))) ((eq type 'mule) (while path-list - (if (equal (substring (car path-list) -14) - (concat "mule-packages" (char-to-string directory-sep-char))) + (if (equal (file-name-nondirectory + (directory-file-name (car path-list))) + "mule-packages") (setq top-dir (car path-list))) (setq path-list (cdr path-list))))))) ;; Now return either the directory or nil.