/[emacs]/emacs/lisp/emacs-lisp/shadow.el
ViewVC logotype

Diff of /emacs/lisp/emacs-lisp/shadow.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by rms, Thu Mar 28 18:15:32 2002 UTC revision 1.13.2.1 by miles, Fri Apr 4 06:20:16 2003 UTC
# Line 53  Line 53 
53    
54  ;;; Code:  ;;; Code:
55    
56  (defgroup shadow nil  (defgroup lisp-shadow nil
57    "Locate Emacs Lisp file shadowings."    "Locate Emacs Lisp file shadowings."
58    :prefix "shadows-"    :prefix "shadows-"
59    :group 'lisp)    :group 'lisp)
# Line 62  Line 62 
62    "*If non-nil, then shadowing files are reported only if their text differs.    "*If non-nil, then shadowing files are reported only if their text differs.
63  This is slower, but filters out some innocuous shadowing."  This is slower, but filters out some innocuous shadowing."
64    :type 'boolean    :type 'boolean
65    :group 'shadow)    :group 'lisp-shadow)
66    
67  (defun find-emacs-lisp-shadows (&optional path)  (defun find-emacs-lisp-shadows (&optional path)
68    "Return a list of Emacs Lisp files that create shadows.    "Return a list of Emacs Lisp files that create shadows.
# Line 74  the file in position 2i+1.  Emacs Lisp f Line 74  the file in position 2i+1.  Emacs Lisp f
74  are stripped from the file names in the list.  are stripped from the file names in the list.
75    
76  See the documentation for `list-load-path-shadows' for further information."  See the documentation for `list-load-path-shadows' for further information."
77      
78    (or path (setq path load-path))    (or path (setq path load-path))
79    
80    (let (true-names                      ; List of dirs considered.    (let (true-names                      ; List of dirs considered.
# Line 86  See the documentation for `list-load-pat Line 86  See the documentation for `list-load-pat
86          files-seen-this-dir             ; Files seen so far in this dir.          files-seen-this-dir             ; Files seen so far in this dir.
87          file)                           ; The current file.          file)                           ; The current file.
88    
89      
90      (while path      (while path
91    
92        (setq dir (directory-file-name (file-truename (or (car path) "."))))        (setq dir (directory-file-name (file-truename (or (car path) "."))))
# Line 125  See the documentation for `list-load-pat Line 125  See the documentation for `list-load-pat
125              ;; This test prevents us declaring that XXX.el shadows              ;; This test prevents us declaring that XXX.el shadows
126              ;; XXX.elc (or vice-versa) when they are in the same directory.              ;; XXX.elc (or vice-versa) when they are in the same directory.
127              (setq files-seen-this-dir (cons file files-seen-this-dir))              (setq files-seen-this-dir (cons file files-seen-this-dir))
128                  
129              (if (setq orig-dir (assoc file files))              (if (setq orig-dir (assoc file files))
130                  ;; This file was seen before, we have a shadowing.                  ;; This file was seen before, we have a shadowing.
131                  ;; Report it unless the files are identical.                  ;; Report it unless the files are identical.
# Line 202  considered to shadow a later file XXX.el Line 202  considered to shadow a later file XXX.el
202  When run interactively, the shadowings \(if any\) are displayed in a  When run interactively, the shadowings \(if any\) are displayed in a
203  buffer called `*Shadows*'.  Shadowings are located by calling the  buffer called `*Shadows*'.  Shadowings are located by calling the
204  \(non-interactive\) companion function, `find-emacs-lisp-shadows'."  \(non-interactive\) companion function, `find-emacs-lisp-shadows'."
205      
206    (interactive)    (interactive)
207    (let* ((path (copy-sequence load-path))    (let* ((path (copy-sequence load-path))
208          (tem path)          (tem path)

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.13.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26