From: Glenn Morris Date: Tue, 11 Sep 2012 07:13:21 +0000 (-0700) Subject: load-path-shadows-font-lock-keywords tweak X-Git-Tag: emacs-24.2.90~269^2~3^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=511fd0b2f470a33bf7f3d101ab03fcf47b797218;p=emacs.git load-path-shadows-font-lock-keywords tweak * lisp/emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords): Be more robust about locating simple.el. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5d0d00be9dc..b448f30e5e3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-11 Glenn Morris + + * emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords): + Be more robust about locating simple.el. + 2012-09-10 Glenn Morris * mail/emacsbug.el (report-emacs-bug): Trap load-path-shadows errors. diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 286c4937b5b..bceec296ad8 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -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'.")