From f963ea40efabcb628811af1eb0e16c52f32b8cd4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 17 Jun 2005 15:34:39 +0000 Subject: [PATCH] (command-line): Warn if specified user name has no home directory. --- lisp/startup.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/startup.el b/lisp/startup.el index 53539c6185f..6af6e748ee5 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -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 -- 2.39.2