"*If non-nil, then shadowing files are reported only if their text differs.
This is slower, but filters out some innocuous shadowing."
:type 'boolean
"*If non-nil, then shadowing files are reported only if their text differs.
This is slower, but filters out some innocuous shadowing."
:type 'boolean
(defun find-emacs-lisp-shadows (&optional path)
"Return a list of Emacs Lisp files that create shadows.
(defun find-emacs-lisp-shadows (&optional path)
"Return a list of Emacs Lisp files that create shadows.
are stripped from the file names in the list.
See the documentation for `list-load-path-shadows' for further information."
are stripped from the file names in the list.
See the documentation for `list-load-path-shadows' for further information."
;; This test prevents us declaring that XXX.el shadows
;; XXX.elc (or vice-versa) when they are in the same directory.
(setq files-seen-this-dir (cons file files-seen-this-dir))
;; This test prevents us declaring that XXX.el shadows
;; XXX.elc (or vice-versa) when they are in the same directory.
(setq files-seen-this-dir (cons file files-seen-this-dir))
(if (setq orig-dir (assoc file files))
;; This file was seen before, we have a shadowing.
;; Report it unless the files are identical.
(if (setq orig-dir (assoc file files))
;; This file was seen before, we have a shadowing.
;; Report it unless the files are identical.
;; This is a bit strict, but safe.
(shadow-same-file-or-nonexistent
(concat base1 ".elc") (concat base2 ".elc"))))
;; This is a bit strict, but safe.
(shadow-same-file-or-nonexistent
(concat base1 ".elc") (concat base2 ".elc"))))
;; Not seen before, add it to the list of seen files.
(setq files (cons (cons file dir) files))))
;; Not seen before, add it to the list of seen files.
(setq files (cons (cons file dir) files))))
When run interactively, the shadowings \(if any\) are displayed in a
buffer called `*Shadows*'. Shadowings are located by calling the
\(non-interactive\) companion function, `find-emacs-lisp-shadows'."
When run interactively, the shadowings \(if any\) are displayed in a
buffer called `*Shadows*'. Shadowings are located by calling the
\(non-interactive\) companion function, `find-emacs-lisp-shadows'."
;; This avoids loads of duplications between the source dir
;; and the dir where these files were copied by installation.
;; This avoids loads of duplications between the source dir
;; and the dir where these files were copied by installation.