update.
[chise/xemacs-chise.git] / lisp / startup.el
index 14e0c66..91c82c0 100644 (file)
@@ -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.
@@ -422,10 +426,15 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n")
                             debug-paths))
       (startup-setup-paths-warning))
 
-    (if (and (not inhibit-autoloads)
-            lisp-directory)
-       (load (expand-file-name (file-name-sans-extension autoload-file-name)
-                               lisp-directory) nil t))
+    (when (and (not inhibit-autoloads)
+              lisp-directory)
+      (load (expand-file-name (file-name-sans-extension autoload-file-name)
+                             lisp-directory) nil t)
+      (if (featurep 'utf-2000)
+         (load (expand-file-name
+                (file-name-sans-extension autoload-file-name)
+                (expand-file-name "utf-2000" lisp-directory))
+               nil t)))
 
     (if (not inhibit-autoloads)
        (progn
@@ -662,7 +671,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 +680,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 +695,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 +740,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))
@@ -1062,7 +1077,9 @@ Copyright (C) 1985-1999 Free Software Foundation, Inc.
 Copyright (C) 1990-1994 Lucid, Inc.
 Copyright (C) 1993-1997 Sun Microsystems, Inc. All Rights Reserved.
 Copyright (C) 1994-1996 Board of Trustees, University of Illinois
-Copyright (C) 1995-1996 Ben Wing\n"))
+Copyright (C) 1995-1996 Ben Wing
+Copyright (C) 1996-2000 MORIOKA Tomohiko
+"))
 
     ((face (blue bold underline) "\nInformation, on-line help:\n\n")
      "XEmacs comes with plenty of documentation...\n\n"