]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/startup.el (command-line): Handle altered user-emacs-directory
authorGlenn Morris <rgm@gnu.org>
Sat, 4 Oct 2014 18:58:41 +0000 (11:58 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 4 Oct 2014 18:58:41 +0000 (11:58 -0700)
in load-path warning.

Fixes: debbugs:18512
lisp/ChangeLog
lisp/startup.el

index 2ce89cdb65528cd9f9414b60b4c615d4a9d3f596..6e3be6ce9aab94b284d98fe62c6baa7371d17f1f 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-04  Glenn Morris  <rgm@gnu.org>
+
+       * startup.el (command-line):
+       Handle altered user-emacs-directory in load-path warning.  (Bug#18512)
+
 2014-10-04  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (window-full-height-p): Make it behave correctly for
index a9bba57d7078721fc3c23cedb1ea318e5e9eb07e..1f524dc119e29bf06312949b67406008e5311000 100644 (file)
@@ -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)