]> code.delx.au - gnu-emacs/blobdiff - lisp/startup.el
(command-line): On MS-Windows, probe "~", not "~USER", for warning about
[gnu-emacs] / lisp / startup.el
index 470ffd7745c8637bfa97432bb34268a3faeed586..a9a79e63be4b41e08e22b0357cf062195be96b2d 100644 (file)
@@ -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"
@@ -1620,7 +1629,7 @@ normal otherwise."
             (not noninteractive))
     (display-warning
      'initialization
-     "Building Emacs overflowed pure space."
+     "Building Emacs overflowed pure space.  See \"(elisp)Building Emacs\" for more information."
      ;; FIXME: Tell the user what kind of problems are possible and how to fix
      ;; the overflow.
      :warning))