Mercurial > hg > xemacs-beta
comparison lisp/find-paths.el @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | 6240c7796c7a |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
64 (car directories))))) | 64 (car directories))))) |
65 (if (paths-file-readable-directory-p directory) | 65 (if (paths-file-readable-directory-p directory) |
66 (let ((raw-entries | 66 (let ((raw-entries |
67 (if (equal 0 max-depth) | 67 (if (equal 0 max-depth) |
68 '() | 68 '() |
69 (directory-files directory nil "^[^.-]"))) | 69 (directory-files directory nil "^[^.-]"))) |
70 (reverse-dirs '())) | 70 (reverse-dirs '())) |
71 | |
72 (while raw-entries | 71 (while raw-entries |
73 (if (null (string-match exclude-regexp (car raw-entries))) | 72 (if (null (string-match exclude-regexp (car raw-entries))) |
74 (setq reverse-dirs | 73 (setq reverse-dirs |
75 (cons (expand-file-name (car raw-entries) directory) | 74 (cons (expand-file-name (car raw-entries) directory) |
76 reverse-dirs))) | 75 reverse-dirs))) |
104 ;; installed | 103 ;; installed |
105 (paths-file-readable-directory-p (paths-construct-path (list directory | 104 (paths-file-readable-directory-p (paths-construct-path (list directory |
106 "lib" | 105 "lib" |
107 emacs-program-name))) | 106 emacs-program-name))) |
108 ;; in-place or windows-nt | 107 ;; in-place or windows-nt |
109 (and | 108 (and |
110 (paths-file-readable-directory-p (paths-construct-path (list directory "lisp"))) | 109 (paths-file-readable-directory-p (paths-construct-path (list directory "lisp"))) |
111 (paths-file-readable-directory-p (paths-construct-path (list directory "etc")))))) | 110 (paths-file-readable-directory-p (paths-construct-path (list directory "etc")))))) |
112 | 111 |
113 (defun paths-chase-symlink (file-name) | 112 (defun paths-chase-symlink (file-name) |
114 "Chase a symlink until the bitter end." | 113 "Chase a symlink until the bitter end." |
151 path))) | 150 path))) |
152 | 151 |
153 (defun paths-construct-emacs-directory (root suffix base) | 152 (defun paths-construct-emacs-directory (root suffix base) |
154 "Construct a directory name within the XEmacs hierarchy." | 153 "Construct a directory name within the XEmacs hierarchy." |
155 (file-name-as-directory | 154 (file-name-as-directory |
156 (expand-file-name | 155 (expand-file-name |
157 (concat | 156 (concat |
158 (file-name-as-directory root) | 157 (file-name-as-directory root) |
159 suffix | 158 suffix |
160 base)))) | 159 base)))) |
161 | 160 |
234 (defun paths-directories-which-exist (directories) | 233 (defun paths-directories-which-exist (directories) |
235 "Return the directories among DIRECTORIES." | 234 "Return the directories among DIRECTORIES." |
236 (let ((reverse-directories '())) | 235 (let ((reverse-directories '())) |
237 (while directories | 236 (while directories |
238 (if (paths-file-readable-directory-p (car directories)) | 237 (if (paths-file-readable-directory-p (car directories)) |
239 (setq reverse-directories | 238 (setq reverse-directories |
240 (cons (car directories) | 239 (cons (car directories) |
241 reverse-directories))) | 240 reverse-directories))) |
242 (setq directories (cdr directories))) | 241 (setq directories (cdr directories))) |
243 (reverse reverse-directories))) | 242 (reverse reverse-directories))) |
244 | 243 |