From b2ee3a278b06e270a0664547d621d7bbe1890ec2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 4 Oct 2014 11:58:41 -0700 Subject: [PATCH] * lisp/startup.el (command-line): Handle altered user-emacs-directory in load-path warning. Fixes: debbugs:18512 --- lisp/ChangeLog | 5 +++++ lisp/startup.el | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2ce89cdb655..6e3be6ce9aa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-10-04 Glenn Morris + + * startup.el (command-line): + Handle altered user-emacs-directory in load-path warning. (Bug#18512) + 2014-10-04 Martin Rudalics * window.el (window-full-height-p): Make it behave correctly for diff --git a/lisp/startup.el b/lisp/startup.el index a9bba57d707..1f524dc119e 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1286,7 +1286,11 @@ the `--debug-init' option to view a complete error backtrace." (let (warned) (dolist (dir load-path) (and (not warned) - (string-match-p "/[._]emacs\\.d/?\\'" dir) + (string-match-p + (format "/%s/?\\'" + (regexp-quote + (file-name-nondirectory + (directory-file-name user-emacs-directory)))) dir) (string-equal (file-name-as-directory (expand-file-name dir)) (expand-file-name user-emacs-directory)) (setq warned t) -- 2.39.5