]> code.delx.au - gnu-emacs/commitdiff
load-path-shadows-font-lock-keywords tweak
authorGlenn Morris <rgm@gnu.org>
Tue, 11 Sep 2012 07:13:21 +0000 (00:13 -0700)
committerGlenn Morris <rgm@gnu.org>
Tue, 11 Sep 2012 07:13:21 +0000 (00:13 -0700)
* lisp/emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords):
Be more robust about locating simple.el.

lisp/ChangeLog
lisp/emacs-lisp/shadow.el

index 5d0d00be9dc852d5b80473188b7f6123d768f1e5..b448f30e5e310ee57cdc65474ae6c24729f50549 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-11  Glenn Morris  <rgm@gnu.org>
+
+       * emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords):
+       Be more robust about locating simple.el.
+
 2012-09-10  Glenn Morris  <rgm@gnu.org>
 
        * mail/emacsbug.el (report-emacs-bug): Trap load-path-shadows errors.
index 286c4937b5b0011302481f439b1218d097b756dc..bceec296ad81575af73421dbcec4cc40d57fb8c8 100644 (file)
@@ -158,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'.")