X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fstartup.el;h=26cc29935de961eea1ce9fe7fa53d4485e8d32bc;hb=a8e771edf595dcbfa8301a1b52187758bed7b615;hp=937dcdfa7ac38a06f66ee18571c6fca01a9752f1;hpb=de1ec4b272dfa3f9ef2c9ae28a9ba67170d24da5;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/startup.el b/lisp/startup.el index 937dcdf..26cc299 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -421,10 +421,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 @@ -710,43 +715,56 @@ perform the migration at any time with M-x migrate-user-init-file.") (yes-or-no-p-minibuf (concat "Migrate init file to " user-init-directory "? ")))) - (progn - (migrate-user-init-file) - (maybe-create-compatibility-dot-emacs)) - (customize-save-variable 'load-home-init-file t)))) -(defun maybe-create-compatibility-dot-emacs () - "Ask user if she wants to create a .emacs compatibility file." - (if (with-output-to-temp-buffer (help-buffer-name nil) - (progn - (princ "The initialization code has now been migrated to the ") - (princ user-init-directory) - (princ "directory. + (let ((backup (migrate-user-init-file))) + (with-output-to-temp-buffer (help-buffer-name nil) + (progn + (princ "The initialization code has now been migrated to the ") + (princ user-init-directory) + (princ "directory. For backwards compatibility with, for example, older versions of XEmacs, XEmacs can create a special old-style .emacs file in your home directory which will load the relocated initialization code.") - (show-temp-buffer-in-current-frame standard-output) - (yes-or-no-p-minibuf "Create compatibility .emacs? "))) + (if backup + (progn + (princ "\nMoreover, a backup of your old .emacs file was created as\n") + (princ backup) + (princ ".\n"))) + (show-temp-buffer-in-current-frame standard-output) + (maybe-create-compatibility-dot-emacs)))) + (customize-save-variable 'load-home-init-file t)))) + +(defun maybe-create-compatibility-dot-emacs () + "Ask user if she wants to create a .emacs compatibility file." + (if (yes-or-no-p-minibuf "Create compatibility .emacs? ") (create-compatibility-dot-emacs))) (defun migrate-user-init-file () - "Migrate the init file from the home directory." + "Migrate the init file from the home directory. +Return the name of backup file, if one was created." (interactive) (if (not (file-exists-p user-init-directory)) (progn (message "Creating %s directory..." user-init-directory) (make-directory user-init-directory))) (message "Migrating custom file...") - (customize-set-value 'load-home-init-file nil) - (custom-migrate-custom-file (make-custom-file-name user-init-file - 'force-new)) - (message "Moving init file...") - (let ((new-user-init-file (expand-file-name user-init-file-base - user-init-directory))) - (rename-file user-init-file new-user-init-file) - (setq user-init-file new-user-init-file)) - (message "Migration done.")) + (let* ((backup (concat user-init-file ".backup")) + (backup-p + (and (not (file-exists-p backup)) + (progn + (copy-file user-init-file backup) + t)))) + (customize-set-value 'load-home-init-file nil) + (custom-migrate-custom-file (make-custom-file-name user-init-file + 'force-new)) + (message "Moving init file...") + (let ((new-user-init-file (expand-file-name user-init-file-base + user-init-directory))) + (rename-file user-init-file new-user-init-file) + (setq user-init-file new-user-init-file)) + (message "Migration done.") + (and backup-p backup))) (defun create-compatibility-dot-emacs () "Create .emacs compatibility file for migrated setup." @@ -1130,7 +1148,9 @@ Copyright (C) 1985-2001 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-2001 Ben Wing\n")) +Copyright (C) 1995-2001 Ben Wing +Copyright (C) 1996-2002 MORIOKA Tomohiko +")) ((face (blue bold underline) "\nInformation, on-line help:\n\n") "XEmacs comes with plenty of documentation...\n\n" @@ -1289,6 +1309,17 @@ It's idempotent, so call this as often as you like!" 'external-debugging-output))) (setq mule-lisp-directory '())) + (if (featurep 'utf-2000) + (progn + (setq utf-2000-lisp-directory + (paths-find-utf-2000-lisp-directory roots + lisp-directory)) + (if debug-paths + (princ (format "utf-2000-lisp-directory:\n%S\n" + utf-2000-lisp-directory) + 'external-debugging-output))) + (setq utf-2000-lisp-directory '())) + (setq site-directory (and (null inhibit-site-lisp) (paths-find-site-lisp-directory roots))) @@ -1302,7 +1333,8 @@ It's idempotent, so call this as often as you like!" last-package-load-path lisp-directory site-directory - mule-lisp-directory)) + mule-lisp-directory + utf-2000-lisp-directory)) (setq Info-directory-list (paths-construct-info-path roots @@ -1372,6 +1404,9 @@ It's idempotent, so call this as often as you like!" (if (and (featurep 'mule) (null mule-lisp-directory)) (push "mule-lisp-directory" warnings)) + (if (and (featurep 'utf-2000) + (null utf-2000-lisp-directory)) + (push "utf-2000-lisp-directory" warnings)) (if (null exec-directory) (push "exec-directory" warnings)) (if (null data-directory) (push "data-directory" warnings)) (if (null doc-directory) (push "doc-directory" warnings))