comparison lisp/startup.el @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents d71d2cefa42d
children fd36a980d701
comparison
equal deleted inserted replaced
5117:3742ea8250b5 5118:e0db3c197671
172 Otherwise, XEmacs will offer migration to the init directory.") 172 Otherwise, XEmacs will offer migration to the init directory.")
173 173
174 (defvar load-user-init-file-p t 174 (defvar load-user-init-file-p t
175 "Non-nil if XEmacs should load the user's init file.") 175 "Non-nil if XEmacs should load the user's init file.")
176 176
177 ;; #### called `site-run-file' in FSFmacs 177 ;; #### called `site-run-file' in GNU Emacs
178 178
179 (defvar site-start-file "site-start" 179 (defvar site-start-file "site-start"
180 "File containing site-wide run-time initializations. 180 "File containing site-wide run-time initializations.
181 It is loaded at run-time before the user's init file (see `user-init-file'). 181 It is loaded at run-time before the user's init file (see `user-init-file').
182 It contains inits that need to be in place for the entire site, but 182 It contains inits that need to be in place for the entire site, but
232 ("-f" . command-line-do-funcall) 232 ("-f" . command-line-do-funcall)
233 ("-e" . command-line-do-funcall-1) 233 ("-e" . command-line-do-funcall-1)
234 ("-eval" . command-line-do-eval) 234 ("-eval" . command-line-do-eval)
235 ("-load" . command-line-do-load) 235 ("-load" . command-line-do-load)
236 ("-l" . command-line-do-load) 236 ("-l" . command-line-do-load)
237 ("--script" . command-line-do-script)
238 ("-script" . command-line-do-script)
237 ("-insert" . command-line-do-insert) 239 ("-insert" . command-line-do-insert)
238 ("-i" . command-line-do-insert) 240 ("-i" . command-line-do-insert)
239 ("-kill" . command-line-do-kill) 241 ("-kill" . command-line-do-kill)
240 ("-eol" . command-line-do-enable-eol-detection) 242 ("-eol" . command-line-do-enable-eol-detection)
241 ("-enable-eol-detection" . command-line-do-enable-eol-detection) 243 ("-enable-eol-detection" . command-line-do-enable-eol-detection)
283 created. Otherwise, an initial Windows frame will be 285 created. Otherwise, an initial Windows frame will be
284 created if Windows support exists and neither -nw nor 286 created if Windows support exists and neither -nw nor
285 -t is given. Otherwise, a TTY frame is created. 287 -t is given. Otherwise, a TTY frame is created.
286 -unmapped Do not display the initial frame. Useful to create 288 -unmapped Do not display the initial frame. Useful to create
287 a \"server\" that can accept `gnuclient' connections. 289 a \"server\" that can accept `gnuclient' connections.
290 -tty Create the initial frame on the given window system.
291 -x (Requesting an unsupported window system, or giving
292 -gtk conflicting window systems, is a fatal error.)
293 -gnome
294 -msw
288 295
289 Noninteractive options: 296 Noninteractive options:
290 297
291 {-help} 298 {-help}
292 {-version} 299 {-version}
430 ;; otherwise let `load' search for it. 437 ;; otherwise let `load' search for it.
431 (if (file-exists-p (expand-file-name file)) 438 (if (file-exists-p (expand-file-name file))
432 (setq file (expand-file-name file))) 439 (setq file (expand-file-name file)))
433 (load file nil t))) 440 (load file nil t)))
434 441
442 (defun command-line-do-script (arg)
443 "Load the named file of Lisp code into XEmacs.
444 <file>"
445 (let ((file (pop command-line-args-left)))
446 (load file nil t t)))
447
435 (defun command-line-do-insert (arg) 448 (defun command-line-do-insert (arg)
436 "Insert file into the current buffer. 449 "Insert file into the current buffer.
437 <file>" 450 <file>"
438 (insert-file-contents (pop command-line-args-left))) 451 (insert-file-contents (pop command-line-args-left)))
439 452
567 (run-hooks 'term-setup-hook)) 580 (run-hooks 'term-setup-hook))
568 (setq term-setup-hook nil) 581 (setq term-setup-hook nil)
569 ;; ;; Modify the initial frame based on what the init file puts into 582 ;; ;; Modify the initial frame based on what the init file puts into
570 ;; ;; ...-frame-alist. 583 ;; ;; ...-frame-alist.
571 (frame-notice-user-settings) 584 (frame-notice-user-settings)
572 ;; ;;####FSFmacs junk 585 ;; ;;#### GNU Emacs junk
573 ;; ;; Now we know the user's default font, so add it to the menu. 586 ;; ;; Now we know the user's default font, so add it to the menu.
574 ;; (if (fboundp 'font-menu-add-default) 587 ;; (if (fboundp 'font-menu-add-default)
575 ;; (font-menu-add-default)) 588 ;; (font-menu-add-default))
576 (when window-setup-hook 589 (when window-setup-hook
577 (run-hooks 'window-setup-hook)) 590 (run-hooks 'window-setup-hook))
581 ;; wipe out the user's .emacs if she hasn't migrated yet! 594 ;; wipe out the user's .emacs if she hasn't migrated yet!
582 (signal-error (car error-data) (cdr error-data)))) 595 (signal-error (car error-data) (cdr error-data))))
583 596
584 (if load-user-init-file-p 597 (if load-user-init-file-p
585 (maybe-migrate-user-init-file)) 598 (maybe-migrate-user-init-file))
586 ;; FSF calls precompute-menubar-bindings. We don't mix menubars 599 ;; GNU calls precompute-menubar-bindings. We don't mix menubars
587 ;; and keymaps. 600 ;; and keymaps.
588 )) 601 ))
589 602
590 (defun command-line-early (args) 603 (defun command-line-early (args)
591 ;; This processes those switches which need to be processed before 604 ;; This processes those switches which need to be processed before
604 (setq version-control nil)) 617 (setq version-control nil))
605 ((or (string= vc "never") 618 ((or (string= vc "never")
606 (string= vc "simple")) 619 (string= vc "simple"))
607 (setq version-control 'never)))) 620 (setq version-control 'never))))
608 621
609 ;;####FSFmacs 622 ;;#### GNU Emacs
610 ;; (if (let ((ctype 623 ;; (if (let ((ctype
611 ;; ;; Use the first of these three envvars that has a nonempty value. 624 ;; ;; Use the first of these three envvars that has a nonempty value.
612 ;; (or (let ((string (getenv "LC_ALL"))) 625 ;; (or (let ((string (getenv "LC_ALL")))
613 ;; (and (not (equal string "")) string)) 626 ;; (and (not (equal string "")) string))
614 ;; (let ((string (getenv "LC_CTYPE"))) 627 ;; (let ((string (getenv "LC_CTYPE")))
711 (if (featurep 'toolbar) 724 (if (featurep 'toolbar)
712 (if (featurep 'infodock) 725 (if (featurep 'infodock)
713 (require 'id-x-toolbar) 726 (require 'id-x-toolbar)
714 (init-toolbar))) 727 (init-toolbar)))
715 728
716 ;; Run the window system's init function. tty is considered to be 729 ;; Create the initial device (which may be the already-created stdio
717 ;; a type of window system for this purpose. This creates the 730 ;; device, if we're noninteractive).
718 ;; initial (non stdio) device. 731 (make-device initial-device-type nil nil)
719 (when (and initial-window-system (not noninteractive))
720 (funcall (intern (concat "init-"
721 (symbol-name initial-window-system)
722 "-win"))))
723 732
724 ;; When not in batch mode, this creates the first visible frame, 733 ;; When not in batch mode, this creates the first visible frame,
725 ;; and deletes the stdio device. 734 ;; and deletes the stdio device.
726 (frame-initialize)) 735 (frame-initialize))
727 736
842 (if load-home-init-file 851 (if load-home-init-file
843 (find-user-home-directory-init-file home-directory) 852 (find-user-home-directory-init-file home-directory)
844 (or (find-user-init-directory-init-file init-directory) 853 (or (find-user-init-directory-init-file init-directory)
845 (find-user-home-directory-init-file home-directory)))) 854 (find-user-home-directory-init-file home-directory))))
846 855
856 (defun ask-about-user-init-file-migration-p ()
857 "Check whether we want to ask the user if she wants to migrate the init file."
858 (and (not load-home-init-file)
859 (not (find-user-init-directory-init-file user-init-directory))
860 (stringp user-init-file)
861 (file-readable-p user-init-file)))
862
847 (defun maybe-migrate-user-init-file () 863 (defun maybe-migrate-user-init-file ()
848 "Ask user if she wants to migrate the init file(s) to new location." 864 "Ask user if she wants to migrate the init file(s) to new location."
849 (if (and (not load-home-init-file) 865 (if (ask-about-user-init-file-migration-p)
850 (not (find-user-init-directory-init-file user-init-directory))
851 (stringp user-init-file)
852 (file-readable-p user-init-file))
853 (if (with-output-to-temp-buffer (help-buffer-name nil) 866 (if (with-output-to-temp-buffer (help-buffer-name nil)
854 (progn 867 (progn
855 (princ "XEmacs recommends that the initialization code in 868 (princ "XEmacs recommends that the initialization code in
856 ") 869 ")
857 (princ user-init-file) 870 (princ user-init-file)
873 perform the migration at any time with M-x migrate-user-init-file.") 886 perform the migration at any time with M-x migrate-user-init-file.")
874 (show-temp-buffer-in-current-frame standard-output) 887 (show-temp-buffer-in-current-frame standard-output)
875 (yes-or-no-p-minibuf (concat "Migrate init file to " 888 (yes-or-no-p-minibuf (concat "Migrate init file to "
876 user-init-directory 889 user-init-directory
877 "? ")))) 890 "? "))))
891
878 (progn 892 (progn
879 (migrate-user-init-file) 893 (migrate-user-init-file)
880 (maybe-create-compatibility-dot-emacs)) 894 (with-output-to-temp-buffer (help-buffer-name nil)
881 (customize-save-variable 'load-home-init-file t)))) 895 (progn
896 (princ "The initialization code has now been migrated to the ")
897 (princ user-init-directory)
898 (princ "directory.
899
900 For backwards compatibility with, for example, older versions of XEmacs,
901 XEmacs can create a special old-style .emacs file in your home
902 directory which will load the relocated initialization code.
903
904 NOTE THAT THIS WILL OVERWRITE YOUR EXISTING .emacs FILE!")
905 (show-temp-buffer-in-current-frame standard-output)
906 (maybe-create-compatibility-dot-emacs))))
907 (set-load-home-init-file user-init-file t))))
882 908
883 (defun maybe-create-compatibility-dot-emacs () 909 (defun maybe-create-compatibility-dot-emacs ()
884 "Ask user if she wants to create a .emacs compatibility file." 910 "Ask user if she wants to create a .emacs compatibility file."
885 (if (with-output-to-temp-buffer (help-buffer-name nil) 911 (if (yes-or-no-p-minibuf "Create compatibility .emacs?")
886 (progn
887 (princ "The initialization code has now been migrated to the ")
888 (princ user-init-directory)
889 (princ "directory.
890
891 For backwards compatibility with, for example, older versions of XEmacs,
892 XEmacs can create a special old-style .emacs file in your home
893 directory which will load the relocated initialization code.")
894 (show-temp-buffer-in-current-frame standard-output)
895 (yes-or-no-p-minibuf "Create compatibility .emacs? ")))
896 (create-compatibility-dot-emacs))) 912 (create-compatibility-dot-emacs)))
897 913
898 (defun migrate-user-init-file () 914 (defun migrate-user-init-file ()
899 "Migrate the init file from the home directory." 915 "Migrate the init file from the home directory."
900 (interactive) 916 (interactive)
901 (if (not (file-exists-p user-init-directory)) 917 (if (not (file-exists-p user-init-directory))
902 (progn 918 (progn
903 (message "Creating %s directory..." user-init-directory) 919 (message "Creating %s directory..." user-init-directory)
904 (make-directory user-init-directory))) 920 (make-directory user-init-directory)))
905 (message "Migrating custom file...") 921 (message "Migrating custom file...")
906 (customize-set-value 'load-home-init-file nil) 922 (set-load-home-init-file user-init-file nil)
907 (custom-migrate-custom-file (make-custom-file-name user-init-file 923 (setq custom-file (make-custom-file-name user-init-file 'force-new))
908 'force-new)) 924 (custom-save-all)
909 (message "Moving init file...") 925 (message "Copying init file...")
910 (let ((new-user-init-file (expand-file-name user-init-file-base 926 (let ((new-user-init-file (expand-file-name user-init-file-base
911 user-init-directory))) 927 user-init-directory)))
912 (rename-file user-init-file new-user-init-file) 928 (copy-file user-init-file new-user-init-file)
913 (setq user-init-file new-user-init-file)) 929 (setq user-init-file new-user-init-file))
914 (message "Migration done.")) 930 (message "Migration done."))
931
932 (defun set-load-home-init-file (filename val)
933 "Put code in `filename' to set `load-home-init-file' to `val'.
934 More precisely, remove the first `setq' form for `load-home-init-file',
935 and replace it by (setq load-home-init-file t) if `val' is non-nil."
936 (save-excursion
937 (set-buffer (find-file-noselect filename))
938 (goto-char (point-min))
939 (condition-case nil
940 (block find-existing
941 (while (not (eobp))
942 (forward-sexp 1)
943 (backward-sexp 1)
944 (let* ((beginning (point))
945 (sexp (read (current-buffer))))
946 (if (and (consp sexp)
947 (consp (cdr sexp))
948 (eq 'setq (car sexp))
949 (eq 'load-home-init-file (cadr sexp)))
950 (progn
951 (forward-line 1)
952 (delete-region beginning (point))
953 (return-from find-existing nil))
954 (forward-sexp 1)))))
955 (error nil)) ; ignore if there are no sexprs in the file
956 (if val
957 (insert "(setq load-home-init-file t) ; don't load init file from ~/.xemacs/init.el\n"))
958 (save-buffer)))
915 959
916 (defun create-compatibility-dot-emacs () 960 (defun create-compatibility-dot-emacs ()
917 "Create .emacs compatibility file for migrated setup." 961 "Create .emacs compatibility file for migrated setup."
918 (message "Creating .emacs compatibility file.") 962 (message "Creating .emacs compatibility file.")
919 (with-temp-file (expand-file-name ".emacs" "~") 963 (with-temp-file (expand-file-name ".emacs" "~")
945 (let ((target-file-name 989 (let ((target-file-name
946 (or target-file-name (expand-file-name ".emacs" "~")))) 990 (or target-file-name (expand-file-name ".emacs" "~"))))
947 (rename-file user-init-file target-file-name 'ok-if-already-exists) 991 (rename-file user-init-file target-file-name 'ok-if-already-exists)
948 (setq user-init-file target-file-name) 992 (setq user-init-file target-file-name)
949 (let ((old-custom-file custom-file)) 993 (let ((old-custom-file custom-file))
950 (custom-migrate-custom-file target-file-name) 994 (setq custom-file target-file-name)
951 (customize-save-variable 'load-home-init-file t) 995 (custom-save-all)
996 (set-load-home-init-file user-init-file t)
952 (delete-file old-custom-file)))) 997 (delete-file old-custom-file))))
953 998
954 (defun load-user-init-file () 999 (defun load-user-init-file ()
955 "This function actually reads the init file." 1000 "This function actually reads the init file."
956 (if (not user-init-file) 1001 (if (not user-init-file)
1069 ;; Don't let the hook be run twice. 1114 ;; Don't let the hook be run twice.
1070 (setq term-setup-hook nil) 1115 (setq term-setup-hook nil)
1071 1116
1072 ;; Don't clobber a non-scratch buffer if init file 1117 ;; Don't clobber a non-scratch buffer if init file
1073 ;; has selected it. 1118 ;; has selected it.
1074 (when (string= (buffer-name) "*scratch*") 1119 (when (and (string= (buffer-name) "*scratch*")
1120 (not (ask-about-user-init-file-migration-p)))
1075 (unless (or inhibit-startup-message 1121 (unless (or inhibit-startup-message
1076 (input-pending-p)) 1122 (input-pending-p))
1077 (let (tmout) 1123 (let (tmout)
1078 (unwind-protect 1124 (unwind-protect
1079 ;; Guts of with-timeout 1125 ;; Guts of with-timeout
1358 (splash-hack-version-string) 1404 (splash-hack-version-string)
1359 (goto-char (point-max)) 1405 (goto-char (point-max))
1360 (let* ((after-change-functions nil) ; no font-lock, thank you 1406 (let* ((after-change-functions nil) ; no font-lock, thank you
1361 (elements (cond (tty (splash-screen-tty-body)) 1407 (elements (cond (tty (splash-screen-tty-body))
1362 (t (splash-screen-window-body))))) 1408 (t (splash-screen-window-body)))))
1363 (pop-to-buffer (current-buffer))
1364 (delete-other-windows)
1365 (splash-screen-present elements) 1409 (splash-screen-present elements)
1366 (set-buffer-modified-p nil)))) 1410 (set-buffer-modified-p nil))))
1367 1411
1368 (defun xemacs-splash-buffer () 1412 (defun xemacs-splash-buffer ()
1369 "Display XEmacs splash screen in a buffer." 1413 "Display XEmacs splash screen in a buffer."
1370 (interactive) 1414 (interactive)
1371 (let ((buffer (get-buffer-create "*Splash*"))) 1415 (let ((buffer (get-buffer-create "*Splash*")))
1372 (set-buffer buffer) 1416 (set-buffer buffer)
1373 (setq buffer-read-only nil) 1417 (setq buffer-read-only nil)
1374 (erase-buffer buffer) 1418 (erase-buffer buffer)
1419 (pop-to-buffer buffer)
1420 (delete-other-windows)
1375 (display-splash-screen))) 1421 (display-splash-screen)))
1376 1422
1377 ;; (let ((present-file 1423 ;; (let ((present-file
1378 ;; #'(lambda (f) 1424 ;; #'(lambda (f)
1379 ;; (splash-screen-present 1425 ;; (splash-screen-present
1405 returned value. It can be `t' (omit all), one of the symbols `early', 1451 returned value. It can be `t' (omit all), one of the symbols `early',
1406 `late', or `last', or a list of one or more of the symbols. 1452 `late', or `last', or a list of one or more of the symbols.
1407 1453
1408 If SET-GLOBAL-PACKAGE-PATHS is non-nil, initialize the global package path 1454 If SET-GLOBAL-PACKAGE-PATHS is non-nil, initialize the global package path
1409 variables referring to the particular types of packages 1455 variables referring to the particular types of packages
1410 (`early-package-hierarchies', `early-package-load-path', 1456 \(`early-package-hierarchies', `early-package-load-path',
1411 `late-package-hierarchies', `late-package-load-path', 1457 `late-package-hierarchies', `late-package-load-path',
1412 `last-package-hierarchies', `last-package-load-path')." 1458 `last-package-hierarchies', `last-package-load-path')."
1413 (let (earlyp latep lastp earlyp-lp latep-lp lastp-lp) 1459 (let (earlyp latep lastp earlyp-lp latep-lp lastp-lp)
1414 (apply #'(lambda (early late last) 1460 (apply #'(lambda (early late last)
1415 (setq earlyp (and (not (memq 'early inhibit-packages)) early)) 1461 (setq earlyp (and (not (memq 'early inhibit-packages)) early))
1445 (setq debug-paths (or debug-paths 1491 (setq debug-paths (or debug-paths
1446 (and (getenv "EMACSDEBUGPATHS") 1492 (and (getenv "EMACSDEBUGPATHS")
1447 t))) 1493 t)))
1448 1494
1449 (setq emacs-roots (paths-find-emacs-roots invocation-directory invocation-name 1495 (setq emacs-roots (paths-find-emacs-roots invocation-directory invocation-name
1450 #'paths-emacs-data-root-p)) 1496 #'paths-emacs-root-p))
1451 1497
1452 (setq emacs-data-roots (paths-find-emacs-roots invocation-directory invocation-name 1498 (setq emacs-data-roots (paths-find-emacs-roots invocation-directory invocation-name
1453 #'paths-emacs-data-root-p)) 1499 #'paths-emacs-data-root-p))
1454 1500
1455 (if (null emacs-roots) 1501 (if (null emacs-roots)
1476 inhibit-site-lisp: %S 1522 inhibit-site-lisp: %S
1477 called-early: %S 1523 called-early: %S
1478 " inhibit-packages inhibit-site-lisp called-early) 1524 " inhibit-packages inhibit-site-lisp called-early)
1479 'external-debugging-output) 1525 'external-debugging-output)
1480 (princ (format 1526 (princ (format
1481 "emacs-roots: 1527 "invocation-directory: %S
1528 invocation-name: %S
1529 configure-prefix-directory: %S
1530 configure-exec-prefix-directory: %S
1531 emacs-roots:
1482 %S 1532 %S
1483 emacs-data-roots: 1533 emacs-data-roots:
1484 %S 1534 %S
1485 user-init-directory: %S 1535 user-init-directory: %S
1486 configure-package-path: %S 1536 configure-package-path: %S
1487 " emacs-roots emacs-data-roots user-init-directory configure-package-path) 1537 " invocation-directory invocation-name
1538 configure-prefix-directory configure-exec-prefix-directory
1539 emacs-roots emacs-data-roots user-init-directory configure-package-path)
1488 'external-debugging-output) 1540 'external-debugging-output)
1489 ) 1541 )
1490 1542
1491 (setq lisp-directory (paths-find-lisp-directory emacs-roots)) 1543 (setq lisp-directory (paths-find-lisp-directory emacs-data-roots))
1492 1544
1493 (if debug-paths 1545 (if debug-paths
1494 (princ (format "lisp-directory:\n%S\n" lisp-directory) 1546 (princ (format "configure-lisp-directory and lisp-directory:\n%S\n%S\n"
1547 configure-lisp-directory lisp-directory)
1495 'external-debugging-output)) 1548 'external-debugging-output))
1496 1549
1497 (if (featurep 'mule) 1550 (if (featurep 'mule)
1498 (progn 1551 (progn
1499 (setq mule-lisp-directory 1552 (setq mule-lisp-directory
1500 (paths-find-mule-lisp-directory emacs-roots 1553 (paths-find-mule-lisp-directory emacs-data-roots
1501 lisp-directory)) 1554 lisp-directory))
1502 (if debug-paths 1555 (if debug-paths
1503 (princ (format "mule-lisp-directory:\n%S\n" 1556 (princ (format "configure-mule-lisp-directory and mule-lisp-directory:\n%S\n%S\n"
1504 mule-lisp-directory) 1557 configure-mule-lisp-directory mule-lisp-directory)
1505 'external-debugging-output))) 1558 'external-debugging-output)))
1506 (setq mule-lisp-directory '())) 1559 (setq mule-lisp-directory '()))
1507 1560
1508 (setq site-directory (and (null inhibit-site-lisp) 1561 (setq site-directory (and (null inhibit-site-lisp)
1509 (paths-find-site-lisp-directory emacs-roots))) 1562 (paths-find-site-lisp-directory emacs-data-roots)))
1510 1563
1511 (if (and debug-paths (null inhibit-site-lisp)) 1564 (if (and debug-paths (null inhibit-site-lisp))
1512 (princ (format "site-directory:\n%S\n" site-directory) 1565 (princ (format "configure-site-directory and site-directory:\n%S\n%S\n"
1566 configure-site-directory site-directory)
1513 'external-debugging-output)) 1567 'external-debugging-output))
1514 1568
1515 (setq load-path (startup-find-load-path inhibit-packages t)) 1569 (setq load-path (startup-find-load-path inhibit-packages t))
1516 1570
1517 (when debug-paths 1571 (when debug-paths
1518 (princ (format "early-package-hierarchies and early-package-load-path:\n%S\n%S\n" 1572 (princ (format "configure-early-package-directories, early-package-hierarchies and early-package-load-path:\n%S\n%S\n%S\n"
1519 early-package-hierarchies early-package-load-path) 1573 configure-early-package-directories early-package-hierarchies early-package-load-path)
1520 'external-debugging-output) 1574 'external-debugging-output)
1521 (princ (format "late-package-hierarchies and late-package-load-path:\n%S\n%S\n" 1575 (princ (format "configure-late-package-directories, late-package-hierarchies and late-package-load-path:\n%S\n%S\n"
1522 late-package-hierarchies late-package-load-path) 1576 configure-late-package-directories late-package-hierarchies late-package-load-path)
1523 'external-debugging-output) 1577 'external-debugging-output)
1524 (princ (format "last-package-hierarchies and last-package-load-path:\n%S\n%S\n" 1578 (princ (format "configure-last-package-directories, last-package-hierarchies and last-package-load-path:\n%S\n%S\n"
1525 last-package-hierarchies last-package-load-path) 1579 configure-last-package-directories last-package-hierarchies last-package-load-path)
1526 'external-debugging-output)) 1580 'external-debugging-output))
1527 1581
1528 (if debug-paths 1582 (if debug-paths
1529 (princ (format "load-path:\n%S\n" load-path) 1583 (princ (format "load-path:\n%S\n" load-path)
1530 'external-debugging-output)) 1584 'external-debugging-output))
1531 (setq module-directory (paths-find-module-directory emacs-roots)) 1585 (setq module-directory (paths-find-module-directory emacs-roots))
1532 (if debug-paths 1586 (if debug-paths
1533 (princ (format "module-directory:\n%S\n" module-directory) 1587 (princ (format "configure-module-directory and module-directory:\n%S\n"
1588 configure-module-directory module-directory)
1534 'external-debugging-output)) 1589 'external-debugging-output))
1535 (setq site-module-directory (and (null inhibit-site-modules) 1590 (setq site-module-directory (and (null inhibit-site-modules)
1536 (paths-find-site-module-directory 1591 (paths-find-site-module-directory
1537 emacs-roots))) 1592 emacs-roots)))
1538 (if (and debug-paths (null inhibit-site-modules)) 1593 (if (and debug-paths (null inhibit-site-modules))
1539 (princ (format "site-module-directory:\n%S\n" 1594 (princ (format "configure-site-module-directory and site-module-directory:\n%S\n%S\n"
1540 site-module-directory) 1595 configure-site-module-directory site-module-directory)
1541 'external-debugging-output)) 1596 'external-debugging-output))
1542 1597
1543 (setq module-load-path (paths-construct-module-load-path 1598 (setq module-load-path (paths-construct-module-load-path
1544 emacs-roots 1599 emacs-roots
1545 module-directory 1600 module-directory
1546 site-module-directory)) 1601 site-module-directory))
1547 1602
1548 (unless called-early 1603 (unless called-early
1549 (setq Info-directory-list 1604 (setq Info-directory-list
1550 (paths-construct-info-path 1605 (paths-construct-info-path
1551 emacs-roots 1606 emacs-data-roots
1552 early-package-hierarchies late-package-hierarchies last-package-hierarchies)) 1607 early-package-hierarchies late-package-hierarchies last-package-hierarchies))
1553 1608
1554 (if debug-paths 1609 (if debug-paths
1555 (princ (format "Info-directory-list:\n%S\n" Info-directory-list) 1610 (princ (format "configure-info-directory, configure-info-path and Info-directory-list:\n%S\n%S\n%S\n"
1611 configure-info-directory configure-info-path Info-directory-list)
1556 'external-debugging-output)) 1612 'external-debugging-output))
1557 1613
1558 (setq exec-directory (paths-find-exec-directory emacs-roots)) 1614 (setq exec-directory (paths-find-exec-directory emacs-roots))
1559 1615
1560 (if debug-paths 1616 (if debug-paths
1561 (princ (format "exec-directory:\n%s\n" exec-directory) 1617 (princ (format "configure-exec-directory and exec-directory:\n%S\n%S\n"
1618 configure-exec-directory exec-directory)
1562 'external-debugging-output)) 1619 'external-debugging-output))
1563 1620
1564 (setq exec-path 1621 (setq exec-path
1565 (paths-construct-exec-path emacs-roots exec-directory 1622 (paths-construct-exec-path emacs-roots exec-directory
1566 early-package-hierarchies late-package-hierarchies 1623 early-package-hierarchies late-package-hierarchies
1571 'external-debugging-output)) 1628 'external-debugging-output))
1572 1629
1573 (setq doc-directory (paths-find-doc-directory emacs-roots)) 1630 (setq doc-directory (paths-find-doc-directory emacs-roots))
1574 1631
1575 (if debug-paths 1632 (if debug-paths
1576 (princ (format "doc-directory:\n%S\n" doc-directory) 1633 (princ (format "configure-doc-directory and doc-directory:\n%S\n%S\n"
1634 configure-doc-directory doc-directory)
1577 'external-debugging-output)) 1635 'external-debugging-output))
1578 1636
1579 (setq data-directory (paths-find-data-directory emacs-roots)) 1637 (setq data-directory (paths-find-data-directory emacs-data-roots))
1580 1638
1581 (if debug-paths 1639 (if debug-paths
1582 (princ (format "data-directory:\n%S\n" data-directory) 1640 (princ (format "configure-data-directory and data-directory:\n%S\n%S\n"
1641 configure-data-directory data-directory)
1583 'external-debugging-output)) 1642 'external-debugging-output))
1584 1643
1585 (setq data-directory-list (paths-construct-data-directory-list 1644 (setq data-directory-list (paths-construct-data-directory-list
1586 data-directory early-package-hierarchies 1645 data-directory early-package-hierarchies
1587 late-package-hierarchies last-package-hierarchies)) 1646 late-package-hierarchies last-package-hierarchies))