# HG changeset patch # User Eli Zaretskii # Date 1146828960 0 # Node ID 0712a8b0bd8ab1f73bc6a519c4f413562324e0a2 # Parent 5f67d565fee55ebb9d9fe17996fe71766040ec86 (command-line): On MS-Windows, probe "~", not "~USER", for warning about non-existent home directory diff -r 5f67d565fee5 -r 0712a8b0bd8a lisp/startup.el --- a/lisp/startup.el Fri May 05 10:58:10 2006 +0000 +++ b/lisp/startup.el Fri May 05 11:36:00 2006 +0000 @@ -820,7 +820,16 @@ (format "Invalid user name %s" init-file-user) :error) - (if (file-directory-p (expand-file-name (concat "~" init-file-user))) + (if (file-directory-p (expand-file-name + ;; We don't support ~USER on MS-Windows except + ;; for the current user, and always load .emacs + ;; from the current user's home directory (see + ;; below). So always check "~", even if invoked + ;; with "-u USER", or if $USER or $LOGNAME are + ;; set to something different. + (if (eq system-type 'windows-nt) + "~" + (concat "~" init-file-user)))) nil (display-warning 'initialization (format "User %s has no home directory"