2006-05-05 Eli Zaretskii <eliz@gnu.org>
+ * 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)
(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"