Mercurial > hg > xemacs-beta
diff lisp/setup-paths.el @ 4919:9c6ea1581159
Remove a couple of XEmacs-specific duplicate functions, find-paths.el
2010-02-03 Aidan Kehoe <kehoea@parhasard.net>
Delete a couple of XEmacs-specific functions that duplicate CL
functions.
* find-paths.el (paths-filter, paths-uniq-append):
Remove #'paths-filter, a reimplementation of #'remove-if-not, and
#'paths-uniq-append, a reimplementation of #'union with test
#'equal.
(paths-decode-directory-path): Don't use #'path-filter here.
* packages.el (packages-package-hierarchy-directory-names):
Don't use #'path-filter here.
(packages-find-installation-package-directories):
Use #'union, not #'paths-uniq-append here.
* setup-paths.el (paths-find-invocation-roots)
(paths-find-emacs-roots, paths-construct-info-path)
(paths-construct-info-path):
Replace #'paths-filter with #'remove-if-not, #'paths-uniq-append
with #'union.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 03 Feb 2010 09:04:35 +0000 |
parents | 09c3d30b5d4e |
children | 6b6b0f8ab749 |
line wrap: on
line diff
--- a/lisp/setup-paths.el Wed Feb 03 00:20:08 2010 +0000 +++ b/lisp/setup-paths.el Wed Feb 03 09:04:35 2010 +0000 @@ -127,8 +127,7 @@ (maybe-root-2 (file-name-as-directory (paths-construct-path '(".." "..") executable-directory)))) - (paths-filter root-p - (list maybe-root-1 maybe-root-2)))) + (delete-if-not root-p (list maybe-root-1 maybe-root-2)))) (defun paths-find-emacs-roots (invocation-directory invocation-name @@ -143,17 +142,17 @@ invocation-name root-p)) (potential-installation-roots - (paths-uniq-append + (union (and configure-exec-prefix-directory (list (file-name-as-directory configure-exec-prefix-directory))) (and configure-prefix-directory (list (file-name-as-directory - configure-prefix-directory))))) + configure-prefix-directory))) + :test #'equal)) (installation-roots - (paths-filter root-p potential-installation-roots))) - (paths-uniq-append invocation-roots - installation-roots))) + (remove-if-not root-p potential-installation-roots))) + (union invocation-roots installation-roots :test #'equal))) (defun paths-find-site-lisp-directory (roots) "Find the site Lisp directory of the XEmacs hierarchy. @@ -261,7 +260,7 @@ LAST-PACKAGE-HIERARCHIES are lists of package hierarchy roots, respectively." (let ((info-path-envval (getenv "INFOPATH"))) - (paths-uniq-append + (union (append (let ((info-directory (paths-find-version-directory roots (list "info") @@ -275,9 +274,11 @@ (and info-path-envval (paths-decode-directory-path info-path-envval 'drop-empties))) (and (null info-path-envval) - (paths-uniq-append + (union (paths-directories-which-exist configure-info-path) - (paths-directories-which-exist paths-default-info-directories)))))) + (paths-directories-which-exist paths-default-info-directories) + :test #'equal)) + :test #'equal))) (defun paths-find-doc-directory (roots) "Find the documentation directory.