From: Richard M. Stallman Date: Fri, 17 Jun 2005 15:34:39 +0000 (+0000) Subject: (command-line): Warn if specified user name has no home directory. X-Git-Tag: emacs-pretest-22.0.90~8824 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f963ea40efabcb628811af1eb0e16c52f32b8cd4;p=emacs.git (command-line): Warn if specified user name has no home directory. --- 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