X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Floadup.el;h=f29dac8540e7cf69bb6c5f411e5872c8da004e8a;hp=ee86aa902a8d770feec6168e0048eba80997acd2;hb=113b194be934327de99a168d809271db252c07c4;hpb=f3ec20f455f3f1212d2c5ee4cadc984330da9c38 diff --git a/lisp/loadup.el b/lisp/loadup.el index ee86aa9..f29dac8 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -42,18 +42,36 @@ (defvar preloaded-file-list nil "List of files preloaded into the XEmacs binary image.") +(defvar Installation-string nil + "Description of XEmacs installation.") (let ((gc-cons-threshold 30000)) ;; This is awfully damn early to be getting an error, right? (call-with-condition-handler 'really-early-error-handler #'(lambda () - ;; message not defined yet ... + + ;; Initializa Installation-string. We do it before loading + ;; anything so that dumped code can make use of its value. + (setq Installation-string + (save-current-buffer + (set-buffer (get-buffer-create (generate-new-buffer-name + " *temp*"))) + ;; insert-file-contents-internal bogusly calls + ;; format-decode without checking if it's defined. + (fset 'format-decode #'(lambda (f l &optional v) l)) + (insert-file-contents-internal "../Installation") + (fmakunbound 'format-decode) + (prog1 (buffer-substring) + (kill-buffer (current-buffer))))) + (setq load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH"))) (setq module-load-path (split-path (getenv "EMACSBOOTSTRAPMODULEPATH"))) + ;; message not defined yet ... (external-debugging-output (format "\nUsing load-path %s" load-path)) - (external-debugging-output (format "\nUsing module-load-path %s" module-load-path)) + (external-debugging-output (format "\nUsing module-load-path %s" + module-load-path)) ;; We don't want to have any undo records in the dumped XEmacs. (buffer-disable-undo (get-buffer "*scratch*")) @@ -86,7 +104,8 @@ (defun pureload (file) (let ((full-path (locate-file file load-path - (if load-ignore-elc-files ".el:" ".elc:.el:")))) + (if load-ignore-elc-files + '(".el" "") '(".elc" ".el" ""))))) (if full-path (prog1 (load full-path) @@ -98,7 +117,7 @@ ;;(print (format "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name))) nil))) - (load (concat default-directory "../lisp/dumped-lisp.el")) + (load (expand-file-name "../lisp/dumped-lisp.el")) (let ((files preloaded-file-list) file) @@ -145,7 +164,6 @@ ;;; for the sake of the next call to precompute-menubar-bindings. ;(setq define-key-rebound-commands nil) - ;; Note: all compiled Lisp files loaded above this point ;; must be among the ones parsed by make-docfile ;; to construct DOC. Any that are not processed