X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/15ecb7923af303497eec1e7918f7c70aafd33cde..e333157cba3b4ffd7c25f8210a6aa5a21ae10de7:/lisp/loadup.el diff --git a/lisp/loadup.el b/lisp/loadup.el index 5f29c01c77..5c16464282 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -47,6 +47,13 @@ ;;; Code: +;; This is used in xdisp.c to determine when bidi reordering is safe. +;; (It starts non-nil in temacs, but we set it non-nil here anyway, in +;; case someone loads loadup one more time.) We reset it after +;; successfully loading charprop.el, which defines the Unicode tables +;; bidi.c needs for its job. +(setq redisplay--inhibit-bidi t) + ;; Add subdirectories to the load-path for files that might get ;; autoloaded when bootstrapping. ;; This is because PATH_DUMPLOADSEARCH is just "../lisp". @@ -71,10 +78,6 @@ (expand-file-name "textmodes" dir) (expand-file-name "vc" dir))))) -;; Prevent build-time PATH getting stored in the binary. -;; Mainly cosmetic, but helpful for Guix. (Bug#20330) -(setq exec-path nil) - (if (eq t purify-flag) ;; Hash consing saved around 11% of pure space in my tests. (setq purify-flag (make-hash-table :test 'equal :size 80000))) @@ -114,6 +117,10 @@ (load "format") (load "bindings") (load "window") ; Needed here for `replace-buffer-in-windows'. +;; We are now capable of resizing the mini-windows, so give the +;; variable its advertised default value (it starts as nil, see +;; xdisp.c). +(setq resize-mini-windows 'grow-only) (setq load-source-file-function 'load-with-code-conversion) (load "files") @@ -150,6 +157,12 @@ ;; In case loaddefs hasn't been generated yet. (file-error (load "ldefs-boot.el"))) +(let ((new (make-hash-table :test 'equal))) + ;; Now that loaddefs has populated definition-prefixes, purify its contents. + (maphash (lambda (k v) (puthash (purecopy k) (purecopy v) new)) + definition-prefixes) + (setq definition-prefixes new)) + (load "emacs-lisp/nadvice") (load "emacs-lisp/cl-preloaded") (load "minibuffer") ;After loaddefs, for define-minor-mode. @@ -167,7 +180,8 @@ (load "case-table") ;; This file doesn't exist when building a development version of Emacs ;; from the repository. It is generated just after temacs is built. -(load "international/charprop.el" t) +(if (load "international/charprop.el" t) + (setq redisplay--inhibit-bidi nil)) (load "international/characters") (load "composite") @@ -413,6 +427,12 @@ lost after dumping"))) (message "Pure-hashed: %d strings, %d vectors, %d conses, %d bytecodes, %d others" strings vectors conses bytecodes others))) +;; Prevent build-time PATH getting stored in the binary. +;; Mainly cosmetic, but helpful for Guix. (Bug#20330) +;; Do this here, rather than earlier, so that the above code +;; can invoke Git commands and the like. +(setq exec-path nil) + ;; Avoid error if user loads some more libraries now and make sure the ;; hash-consing hash table is GC'd. (setq purify-flag nil) @@ -420,6 +440,9 @@ lost after dumping"))) (if (null (garbage-collect)) (setq pure-space-overflow t)) +;; Make sure we will attempt bidi reordering henceforth. +(setq redisplay--inhibit-bidi nil) + (if (member (car (last command-line-args)) '("dump" "bootstrap")) (progn (message "Dumping under the name emacs")