]> git.eshelyaron.com Git - emacs.git/commitdiff
(command-line): Warn if specified user name has no home directory.
authorRichard M. Stallman <rms@gnu.org>
Fri, 17 Jun 2005 15:34:39 +0000 (15:34 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 17 Jun 2005 15:34:39 +0000 (15:34 +0000)
lisp/startup.el

index 53539c6185ffa7e33651e3bac1444189a5f8f657..6af6e748ee5a71819bdc1fb49d8fe0d688d30e65 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