From 48196164aa206d057874119cac2025d376566365 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Mar 2016 11:51:03 +0200 Subject: Avoid crashes at startup on systems that CANNOT_DUMP * src/xdisp.c (syms_of_xdisp) : New boolean variable. (init_iterator, reseat_to_string) (Fcurrent_bidi_paragraph_direction) (Fbidi_find_overridden_directionality): Use redisplay--inhibit-bidi instead of purify-flag, to determine when it's safe to reorder bidirectional text. * lisp/loadup.el (redisplay--inhibit-bidi): Set to t at the beginning of the file. Reset to nil when charprop.el is successfully loaded, or when we are going to dump, whichever happens last. (Bug#22975) --- lisp/loadup.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lisp/loadup.el') diff --git a/lisp/loadup.el b/lisp/loadup.el index b620e657223..bd47bed3160 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". @@ -162,7 +169,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") @@ -415,6 +423,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") -- cgit v1.2.1 From 38b276d162197a5ca4bd7322ff8a823c3754edb4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 15 Mar 2016 19:46:26 +0200 Subject: Fix startup of "emacs -nw" on systems that CANNOT_DUMP * src/xdisp.c (syms_of_xdisp) : Initialize to nil. * lisp/loadup.el : Set to 'grow-only' after loading window.el. (Bug#22975) --- lisp/loadup.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp/loadup.el') diff --git a/lisp/loadup.el b/lisp/loadup.el index bd47bed3160..21c64a8c3b4 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -117,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") -- cgit v1.2.1