summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-07-23 20:27:41 +0300
committerEli Zaretskii <eliz@gnu.org>2012-07-23 20:27:41 +0300
commitec1b09b12339df0920e8901c6bd355a7afd2bc11 (patch)
treef9915a032e8d61f19d7363fd1f1372f5c120a0c3 /lisp
parent436bc8e0a73e02ed0840633c4d4d4922a222db24 (diff)
downloademacs-ec1b09b12339df0920e8901c6bd355a7afd2bc11.tar.gz
emacs-ec1b09b12339df0920e8901c6bd355a7afd2bc11.tar.bz2
emacs-ec1b09b12339df0920e8901c6bd355a7afd2bc11.zip
Fix displaying the user name in error message about no home directory.
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/startup.el4
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5dee987d401..b43706a0bef 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/startup.el b/lisp/startup.el
index e861a333a76..348e653dd28 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -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.