From 1df1e49eb3895862c358fd12c656727c5be697a8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 5 May 2006 11:36:34 +0000 Subject: [PATCH] (command-line): On MS-Windows, probe "~", not "~USER", for warning about non-existent home directory --- lisp/ChangeLog | 3 +++ lisp/startup.el | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 18b105e9a3..07531c4681 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-05-05 Eli Zaretskii + * startup.el (command-line): On MS-Windows, probe "~", not + "~USER", for warning about non-existent home directory + * arc-mode.el (archive-l-e): New optional argument `float' means generate a float value. (archive-arc-summarize, archive-lzh-summarize) diff --git a/lisp/startup.el b/lisp/startup.el index 8369ecddd4..a9a79e63be 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -820,7 +820,16 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (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" -- 2.39.2