Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-65
[bpt/emacs.git] / lisp / startup.el
index bfe4556..fa18b60 100644 (file)
@@ -797,6 +797,14 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
     ;; the startup message.
     (setq inhibit-startup-message nil)
 
+    ;; Warn for invalid user name.
+    (and init-file-user
+        (not (file-directory-p (expand-file-name (concat "~" init-file-user))))
+        (display-warning 'initialization
+                         (format "User %s has no home directory"
+                                 init-file-user)
+                         :error))
+
     ;; Load that user's init file, or the default one, or none.
     (let (debug-on-error-from-init-file
          debug-on-error-should-be-set