From: Andreas Schwab Date: Sat, 19 Nov 2005 16:53:48 +0000 (+0000) Subject: Handle compressed files. X-Git-Tag: emacs-pretest-22.0.90~5770 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da49096f064057ea082a522fd2688048602c4289;p=emacs.git Handle compressed files. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f22f75f15c..434e634e826 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-11-19 Andreas Schwab + + * emacs-lisp/shadow.el: Handle compressed files. + 2005-11-19 Romain Francoise * net/browse-url.el (browse-url-default-browser): Signal an error diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 9cea82d7780..9e68fb08967 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -104,7 +104,7 @@ See the documentation for `list-load-path-shadows' for further information." (setq true-names (append true-names (list dir))) (setq dir (directory-file-name (or (car path) "."))) (setq curr-files (if (file-accessible-directory-p dir) - (directory-files dir nil ".\\.elc?$" t))) + (directory-files dir nil ".\\.elc?\\(\\.gz\\)?$" t))) (and curr-files (not noninteractive) (message "Checking %d files in %s..." (length curr-files) dir)) @@ -114,6 +114,8 @@ See the documentation for `list-load-path-shadows' for further information." (while curr-files (setq file (car curr-files)) + (if (string-match "\\.gz$" file) + (setq file (substring file 0 -3))) (setq file (substring file 0 (if (string= (substring file -1) "c") -4 -3))) @@ -209,7 +211,8 @@ buffer called `*Shadows*'. Shadowings are located by calling the toplevs) ;; If we can find simple.el in two places, (while tem - (if (file-exists-p (expand-file-name "simple.el" (car tem))) + (if (or (file-exists-p (expand-file-name "simple.el" (car tem))) + (file-exists-p (expand-file-name "simple.el.gz" (car tem)))) (setq toplevs (cons (car tem) toplevs))) (setq tem (cdr tem))) (if (> (length toplevs) 1)