]> git.eshelyaron.com Git - emacs.git/commitdiff
* subr.el (locate-user-emacs-file): Simplify. Don't create
authorJuanma Barranquero <lekktu@gmail.com>
Tue, 28 Oct 2008 11:35:02 +0000 (11:35 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Tue, 28 Oct 2008 11:35:02 +0000 (11:35 +0000)
  `user-emacs-directory' when Emacs is running in batch mode.

lisp/ChangeLog
lisp/subr.el

index 31be499710d9d78af3ba078ff590b7ed122b0d49..58467dead3b73ed2ac2a0ffea1d38c3e62dd9b2a 100644 (file)
@@ -1,5 +1,8 @@
 2008-10-28  Juanma Barranquero  <lekktu@gmail.com>
 
+       * subr.el (locate-user-emacs-file): Simplify.  Don't create
+       `user-emacs-directory' when Emacs is running in batch mode.
+
        * startup.el (inhibit-startup-screen): Reflow docstring.
        (user-mail-address, tool-bar-images-pixel-height): Fix docstring typos.
 
        (vc-hg-diff): If no file is passed, use default-directory for cwd.
 
        * vc-bzr.el (vc-bzr-log-view-mode): Set log-view-per-file-logs.
-
        * vc-svn.el (vc-svn-log-view-mode): New derived mode.
 
 2008-06-15  Michael Albinus  <michael.albinus@gmx.de>
index 0dda4b0e604a4d4eef09083eb977e1d34022df24..f0fe7be07007c5847dd1f138891de7846b6aceae 100644 (file)
@@ -2169,10 +2169,12 @@ directory if it does not exist."
          (at-home (and old-name (expand-file-name old-name home))))
      (if (and at-home (file-readable-p at-home))
         at-home
-       (unless (or purify-flag ;; don't create dir while dumping
-                  (file-accessible-directory-p
-                   (directory-file-name user-emacs-directory)))
-        (make-directory user-emacs-directory t)) ;; don't catch errors
+       ;; Make sure `user-emacs-directory' exists,
+       ;; unless we're in batch mode or dumping Emacs
+       (or noninteractive
+          purify-flag
+          (file-accessible-directory-p (directory-file-name user-emacs-directory))
+          (make-directory user-emacs-directory))
        (expand-file-name new-name user-emacs-directory)))))
 
 \f