Mercurial > emacs
comparison lisp/emacs-lisp/shadow.el @ 67018:ef7892af4fa7
Handle compressed files.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sat, 19 Nov 2005 16:53:32 +0000 |
parents | 5b1a238fcbb4 |
children | 067115a6e738 7beb78bc1f8e |
comparison
equal
deleted
inserted
replaced
67017:fb42f801f872 | 67018:ef7892af4fa7 |
---|---|
102 (message "Ignoring redundant directory %s" (car path)))) | 102 (message "Ignoring redundant directory %s" (car path)))) |
103 | 103 |
104 (setq true-names (append true-names (list dir))) | 104 (setq true-names (append true-names (list dir))) |
105 (setq dir (directory-file-name (or (car path) "."))) | 105 (setq dir (directory-file-name (or (car path) "."))) |
106 (setq curr-files (if (file-accessible-directory-p dir) | 106 (setq curr-files (if (file-accessible-directory-p dir) |
107 (directory-files dir nil ".\\.elc?$" t))) | 107 (directory-files dir nil ".\\.elc?\\(\\.gz\\)?$" t))) |
108 (and curr-files | 108 (and curr-files |
109 (not noninteractive) | 109 (not noninteractive) |
110 (message "Checking %d files in %s..." (length curr-files) dir)) | 110 (message "Checking %d files in %s..." (length curr-files) dir)) |
111 | 111 |
112 (setq files-seen-this-dir nil) | 112 (setq files-seen-this-dir nil) |
113 | 113 |
114 (while curr-files | 114 (while curr-files |
115 | 115 |
116 (setq file (car curr-files)) | 116 (setq file (car curr-files)) |
117 (if (string-match "\\.gz$" file) | |
118 (setq file (substring file 0 -3))) | |
117 (setq file (substring | 119 (setq file (substring |
118 file 0 (if (string= (substring file -1) "c") -4 -3))) | 120 file 0 (if (string= (substring file -1) "c") -4 -3))) |
119 | 121 |
120 ;; FILE now contains the current file name, with no suffix. | 122 ;; FILE now contains the current file name, with no suffix. |
121 (unless (or (member file files-seen-this-dir) | 123 (unless (or (member file files-seen-this-dir) |
207 (let* ((path (copy-sequence load-path)) | 209 (let* ((path (copy-sequence load-path)) |
208 (tem path) | 210 (tem path) |
209 toplevs) | 211 toplevs) |
210 ;; If we can find simple.el in two places, | 212 ;; If we can find simple.el in two places, |
211 (while tem | 213 (while tem |
212 (if (file-exists-p (expand-file-name "simple.el" (car tem))) | 214 (if (or (file-exists-p (expand-file-name "simple.el" (car tem))) |
215 (file-exists-p (expand-file-name "simple.el.gz" (car tem)))) | |
213 (setq toplevs (cons (car tem) toplevs))) | 216 (setq toplevs (cons (car tem) toplevs))) |
214 (setq tem (cdr tem))) | 217 (setq tem (cdr tem))) |
215 (if (> (length toplevs) 1) | 218 (if (> (length toplevs) 1) |
216 ;; Cut off our copy of load-path right before | 219 ;; Cut off our copy of load-path right before |
217 ;; the last directory which has simple.el in it. | 220 ;; the last directory which has simple.el in it. |