diff 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
line wrap: on
line diff
--- a/lisp/packages.el	Wed Feb 03 00:20:08 2010 +0000
+++ b/lisp/packages.el	Wed Feb 03 09:04:35 2010 +0000
@@ -106,11 +106,10 @@
   "Returns a list package hierarchy directory names.
 These are the valid immediate directory names of package
 directories, directories with higher priority first"
-  (paths-filter #'(lambda (x) x)
-		`("site-packages"
-		  ,(when (featurep 'infodock) "infodock-packages")
-		  ,(when (featurep 'mule) "mule-packages")
-		  "xemacs-packages")))
+  (delq nil `("site-packages"
+              ,(when (featurep 'infodock) "infodock-packages")
+              ,(when (featurep 'mule) "mule-packages")
+              "xemacs-packages")))
 
 (defun package-get-key-1 (info key)
   "Locate keyword `key' in list."
@@ -386,8 +385,8 @@
 (defun packages-find-installation-package-directories (roots)
   "Find the package directories in the XEmacs installation.
 ROOTS is a list of installation roots."
-  (paths-uniq-append (paths-find-version-directories roots (list "") nil nil nil t)
-		     (paths-find-site-directories roots (list "") nil)))
+  (union (paths-find-version-directories roots (list "") nil nil nil t)
+         (paths-find-site-directories roots (list "") nil) :test #'equal))
 
 (defun packages-find-package-hierarchies (package-directories &optional envvar default)
   "Find package hierarchies in a list of package directories.