X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fstartup.el;h=e3473aa98e47ae87cd9f7b59eef83c384f405e93;hp=14e0c66fa2642b303f8962d16a622a1d8d75fd79;hb=59eec5f21669e81977b5b1fe9bf717cab49cf7fb;hpb=032d062ebcb2344e6245cea4214bc09835da97ee diff --git a/lisp/startup.el b/lisp/startup.el index 14e0c66..e3473aa 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -159,13 +159,17 @@ is less convenient.") ;;We do that if this regexp matches the locale name ;;specified by the LC_ALL, LC_CTYPE and LANG environment variables.") -(defvar mail-host-address nil - "*Name of this machine, for purposes of naming users.") +(defcustom mail-host-address nil + "*Name of this machine, for purposes of naming users." + :type 'string + :group 'mail) -(defvar user-mail-address nil +(defcustom user-mail-address nil "*Full mailing address of this user. This is initialized based on `mail-host-address', -after your init file is read, in case it sets `mail-host-address'.") +after your init file is read, in case it sets `mail-host-address'." + :type 'string + :group 'mail) (defvar auto-save-list-file-prefix "~/.saves-" "Prefix for generating auto-save-list-file-name. @@ -662,7 +666,7 @@ If this is nil, no message will be displayed.") (catch 'found (dolist (file user-init-file-base-list) (let ((expanded (expand-file-name file init-directory))) - (when (file-exists-p expanded) + (when (file-readable-p expanded) (throw 'found expanded))))))) (defun find-user-home-directory-init-file (&optional home-directory) @@ -671,7 +675,7 @@ If this is nil, no message will be displayed.") (catch 'found (dolist (file user-home-init-file-base-list) (let ((expanded (expand-file-name file home-directory))) - (when (file-exists-p expanded) + (when (file-readable-p expanded) (throw 'found expanded)))) nil))) @@ -686,7 +690,8 @@ If this is nil, no message will be displayed.") "Ask user if she wants to migrate the init file(s) to new location." (if (and (not load-home-init-file) (not (find-user-init-directory-init-file user-init-directory)) - (file-exists-p user-init-file)) + (stringp user-init-file) + (file-readable-p user-init-file)) (if (with-output-to-temp-buffer (help-buffer-name nil) (progn (princ "XEmacs recommends that the initialization code in @@ -730,13 +735,18 @@ perform the migration at any time with M-x migrate-user-init-file.") (defun load-user-init-file () "This function actually reads the init file." - (if (or user-init-file - (setq user-init-file (find-user-init-file user-init-directory))) + (if (not user-init-file) + (setq user-init-file + (find-user-init-file user-init-directory))) + (if (and user-init-file + (file-readable-p user-init-file)) (load user-init-file t t t)) (if (not custom-file) (setq custom-file (make-custom-file-name user-init-file))) - (if (and (not (string= custom-file user-init-file)) - (file-exists-p custom-file)) + (if (and custom-file + (or (not user-init-file) + (not (string= custom-file user-init-file))) + (file-readable-p custom-file)) (load custom-file t t t)) (unless inhibit-default-init (let ((inhibit-startup-message nil))