Mercurial > emacs
comparison lisp/paths.el @ 90203:187d6a1f84f7
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-71
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 485-492)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 92-94)
- Merge from emacs--cvs-trunk--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 22 Jul 2005 08:27:27 +0000 |
parents | f9a65d7ebd29 7a1446b50929 |
children | 2d92f5c9d6ae |
comparison
equal
deleted
inserted
replaced
90202:7597b4a23c3b | 90203:187d6a1f84f7 |
---|---|
35 ;; Docstrings in this file should, where reasonable, follow the | 35 ;; Docstrings in this file should, where reasonable, follow the |
36 ;; conventions described in bindings.el, so that they get put in the | 36 ;; conventions described in bindings.el, so that they get put in the |
37 ;; DOC file rather than in memory. | 37 ;; DOC file rather than in memory. |
38 | 38 |
39 (defun prune-directory-list (dirs &optional keep reject) | 39 (defun prune-directory-list (dirs &optional keep reject) |
40 "Returns a copy of DIRS with all non-existant directories removed. | 40 "Returns a copy of DIRS with all non-existent directories removed. |
41 The optional argument KEEP is a list of directories to retain even if | 41 The optional argument KEEP is a list of directories to retain even if |
42 they don't exist, and REJECT is a list of directories to remove from | 42 they don't exist, and REJECT is a list of directories to remove from |
43 DIRS, even if they exist; REJECT takes precedence over KEEP. | 43 DIRS, even if they exist; REJECT takes precedence over KEEP. |
44 | 44 |
45 Note that membership in REJECT and KEEP is checked using simple string | 45 Note that membership in REJECT and KEEP is checked using simple string |
46 comparision." | 46 comparison." |
47 (apply #'nconc | 47 (apply #'nconc |
48 (mapcar (lambda (dir) | 48 (mapcar (lambda (dir) |
49 (and (not (member dir reject)) | 49 (and (not (member dir reject)) |
50 (or (member dir keep) (file-directory-p dir)) | 50 (or (member dir keep) (file-directory-p dir)) |
51 (list dir))) | 51 (list dir))) |