]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix displaying the user name in error message about no home directory.
authorEli Zaretskii <eliz@gnu.org>
Mon, 23 Jul 2012 17:27:41 +0000 (20:27 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 23 Jul 2012 17:27:41 +0000 (20:27 +0300)
 lisp/startup.el (command-line): Don't display an empty user name in
 the error message about non-existent home directory, when
 init-file-user was set to an empty string.  See
 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00835.html
 for the details and context.

lisp/ChangeLog
lisp/startup.el

index 5dee987d401a113b8300e5c3a952b7288dfb4408..b43706a0bef901d67cf7e3784c6b721323f24dab 100644 (file)
@@ -1,3 +1,11 @@
+2012-07-23  Eli Zaretskii  <eliz@gnu.org>
+
+       * startup.el (command-line): Don't display an empty user name in
+       the error message about non-existent home directory, when
+       init-file-user was set to an empty string.  See
+       http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00835.html
+       for the details and context.
+
 2012-07-22  Vincent Belaïche  <vincentb1@users.sourceforge.net>
 
        * ses.el (ses-cell-formula-aset): New macro.
index e861a333a76be7ccb5d68845b9944adb91a8af07..348e653dd28aa18004f41b071eac2195e7211311 100644 (file)
@@ -1001,7 +1001,9 @@ Amongst another things, it parses the command-line arguments."
            nil
          (display-warning 'initialization
                           (format "User %s has no home directory"
-                                  init-file-user)
+                                  (if (equal init-file-user "")
+                                      (user-real-login-name)
+                                    init-file-user))
                           :error))))
 
     ;; Load that user's init file, or the default one, or none.