* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Add back `declare' in
[bpt/emacs.git] / lisp / emacs-lisp / shadow.el
index e690cba..bceec29 100644 (file)
@@ -1,7 +1,6 @@
 ;;; shadow.el --- locate Emacs Lisp file shadowings
 
-;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-;;   2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2012  Free Software Foundation, Inc.
 
 ;; Author: Terry Jones <terry@santafe.edu>
 ;; Keywords: lisp
@@ -116,7 +115,7 @@ See the documentation for `list-load-path-shadows' for further information."
          ;; FILE now contains the current file name, with no suffix.
          (unless (or (member file files-seen-this-dir)
                      ;; Ignore these files.
-                     (member file '("subdirs")))
+                     (member file '("subdirs" "leim-list")))
            ;; File has not been seen yet in this directory.
            ;; This test prevents us declaring that XXX.el shadows
            ;; XXX.elc (or vice-versa) when they are in the same directory.
@@ -159,8 +158,14 @@ See the documentation for `list-load-path-shadows' for further information."
                      (eq 0 (call-process "cmp" nil nil nil "-s" f1 f2))))))))
 
 (defvar load-path-shadows-font-lock-keywords
+  ;; The idea is that shadows of files supplied with Emacs are more
+  ;; serious than various versions of external packages shadowing each
+  ;; other.
   `((,(format "hides \\(%s.*\\)"
-             (file-name-directory (locate-library "simple.el")))
+             (file-name-directory
+              (or (locate-library "simple")
+                  (file-name-as-directory
+                   (expand-file-name "../lisp" data-directory)))))
      . (1 font-lock-warning-face)))
   "Keywords to highlight in `load-path-shadows-mode'.")