Mercurial > hg > xemacs-beta
comparison lisp/shadow.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 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
49 ;; emacs -batch -l shadow.el -f list-load-path-shadows | 49 ;; emacs -batch -l shadow.el -f list-load-path-shadows |
50 ;; | 50 ;; |
51 ;; Thanks to Francesco Potorti` <pot@cnuce.cnr.it> for suggestions, | 51 ;; Thanks to Francesco Potorti` <pot@cnuce.cnr.it> for suggestions, |
52 ;; rewritings & speedups. | 52 ;; rewritings & speedups. |
53 | 53 |
54 ;; 1998-08-15 Martin Buchholz: Speed up using hashtables instead of lists. | 54 ;; 1998-08-15 Martin Buchholz: Speed up using hash tables instead of lists. |
55 | 55 |
56 ;;; Code: | 56 ;;; Code: |
57 | 57 |
58 (defun find-emacs-lisp-shadows (&optional path) | 58 (defun find-emacs-lisp-shadows (&optional path) |
59 "Return a list of Emacs Lisp files that create shadows. | 59 "Return a list of Emacs Lisp files that create shadows. |
68 | 68 |
69 (let (shadows ; List of shadowings, to be returned. | 69 (let (shadows ; List of shadowings, to be returned. |
70 dir ; The dir being currently scanned. | 70 dir ; The dir being currently scanned. |
71 curr-files ; This dir's Emacs Lisp files. | 71 curr-files ; This dir's Emacs Lisp files. |
72 orig-dir ; Where the file was first seen. | 72 orig-dir ; Where the file was first seen. |
73 (file-dirs | 73 (file-dirs ; File names ever seen, with dirs. |
74 (make-hashtable 2000 'equal)) ; File names ever seen, with dirs. | 74 (make-hash-table :size 2000 :test 'equal)) |
75 (true-names | 75 (true-names ; Dirs ever considered. |
76 (make-hashtable 50 'equal)) ; Dirs ever considered. | 76 (make-hash-table :size 50 :test 'equal)) |
77 (files-seen-this-dir | 77 (files-seen-this-dir ; Files seen so far in this dir. |
78 (make-hashtable 100 'equal)) ; Files seen so far in this dir. | 78 (make-hash-table :size 100 :test 'equal)) |
79 ) | 79 ) |
80 | 80 |
81 (dolist (path-elt (or path load-path)) | 81 (dolist (path-elt (or path load-path)) |
82 | 82 |
83 (setq dir (file-truename (or path-elt "."))) | 83 (setq dir (file-truename (or path-elt "."))) |