diff options
author | Eli Zaretskii <eliz@gnu.org> | 2016-03-12 11:51:03 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-03-12 11:51:03 +0200 |
commit | 48196164aa206d057874119cac2025d376566365 (patch) | |
tree | 56a9f7915878b4b688bc313c4acef58d7e6aabe4 /lisp/loadup.el | |
parent | 6d8e1f0276fb6cce8d3f1e707bf52c18f8fb70d0 (diff) | |
download | emacs-48196164aa206d057874119cac2025d376566365.tar.gz emacs-48196164aa206d057874119cac2025d376566365.tar.bz2 emacs-48196164aa206d057874119cac2025d376566365.zip |
Avoid crashes at startup on systems that CANNOT_DUMP
* src/xdisp.c (syms_of_xdisp) <redisplay--inhibit-bidi>: 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)
Diffstat (limited to 'lisp/loadup.el')
-rw-r--r-- | lisp/loadup.el | 13 |
1 files changed, 12 insertions, 1 deletions
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") |