(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.
(message "This site has duplicate Lisp libraries with the same name.
If a locally-installed Lisp library overrides a library in the Emacs release,
that can cause trouble, and you should probably remove the locally-installed
(message "This site has duplicate Lisp libraries with the same name.
If a locally-installed Lisp library overrides a library in the Emacs release,
that can cause trouble, and you should probably remove the locally-installed
-version unless you know what you are doing.\n"))
- (while shadows
- (message "%s hides %s" (car shadows) (car (cdr shadows)))
- (setq shadows (cdr (cdr shadows))))
- (message "%s" msg)))))
+version unless you know what you are doing.\n")
+ (while shadows
+ (message "%s hides %s" (car shadows) (car (cdr shadows)))
+ (setq shadows (cdr (cdr shadows))))
+ (message "%s" msg))))))