Mercurial > hg > xemacs-beta
comparison lisp/packages.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 | 5da4cc7d5968 |
children | 6b6b0f8ab749 |
comparison
equal
deleted
inserted
replaced
4915:bedf3747a6d7 | 4919:9c6ea1581159 |
---|---|
104 | 104 |
105 (defun packages-package-hierarchy-directory-names () | 105 (defun packages-package-hierarchy-directory-names () |
106 "Returns a list package hierarchy directory names. | 106 "Returns a list package hierarchy directory names. |
107 These are the valid immediate directory names of package | 107 These are the valid immediate directory names of package |
108 directories, directories with higher priority first" | 108 directories, directories with higher priority first" |
109 (paths-filter #'(lambda (x) x) | 109 (delq nil `("site-packages" |
110 `("site-packages" | 110 ,(when (featurep 'infodock) "infodock-packages") |
111 ,(when (featurep 'infodock) "infodock-packages") | 111 ,(when (featurep 'mule) "mule-packages") |
112 ,(when (featurep 'mule) "mule-packages") | 112 "xemacs-packages"))) |
113 "xemacs-packages"))) | |
114 | 113 |
115 (defun package-get-key-1 (info key) | 114 (defun package-get-key-1 (info key) |
116 "Locate keyword `key' in list." | 115 "Locate keyword `key' in list." |
117 (cond ((null info) | 116 (cond ((null info) |
118 nil) | 117 nil) |
384 (apply consumer list)) | 383 (apply consumer list)) |
385 | 384 |
386 (defun packages-find-installation-package-directories (roots) | 385 (defun packages-find-installation-package-directories (roots) |
387 "Find the package directories in the XEmacs installation. | 386 "Find the package directories in the XEmacs installation. |
388 ROOTS is a list of installation roots." | 387 ROOTS is a list of installation roots." |
389 (paths-uniq-append (paths-find-version-directories roots (list "") nil nil nil t) | 388 (union (paths-find-version-directories roots (list "") nil nil nil t) |
390 (paths-find-site-directories roots (list "") nil))) | 389 (paths-find-site-directories roots (list "") nil) :test #'equal)) |
391 | 390 |
392 (defun packages-find-package-hierarchies (package-directories &optional envvar default) | 391 (defun packages-find-package-hierarchies (package-directories &optional envvar default) |
393 "Find package hierarchies in a list of package directories. | 392 "Find package hierarchies in a list of package directories. |
394 PACKAGE-DIRECTORIES is a list of package directories. | 393 PACKAGE-DIRECTORIES is a list of package directories. |
395 DEFAULT is a default list of package hierarchies. | 394 DEFAULT is a default list of package hierarchies. |