summaryrefslogtreecommitdiff
path: root/src/xdisp.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-11-28 17:00:33 +0200
committerEli Zaretskii <eliz@gnu.org>2019-11-28 17:00:33 +0200
commit5629af9cbe91feee8fb4d896224ed62e455f951d (patch)
treec3d4217e2d54f4f8b3fb354affbb61b96f624e09 /src/xdisp.c
parentb05aa8d742d80aeb692c54289e8ccb074a68bf51 (diff)
downloademacs-5629af9cbe91feee8fb4d896224ed62e455f951d.tar.gz
emacs-5629af9cbe91feee8fb4d896224ed62e455f951d.tar.bz2
emacs-5629af9cbe91feee8fb4d896224ed62e455f951d.zip
Allow disabling the BPA part of bidi reordering
* src/xdisp.c (syms_of_xdisp): New variable 'bidi-inhibit-bpa'. * src/bidi.c (bidi_paired_bracket_type): If 'bidi-inhibit-bpa' is non-nil, return BIDI_BRACKET_NONE for all characters. * lisp/frame.el: Add 'bidi-inhibit-bpa' to the list of variables whose changes require redisplay. (Bug#38407)
Diffstat (limited to 'src/xdisp.c')
-rw-r--r--src/xdisp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index c4d23be4cde..2467b336f4a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -34839,6 +34839,14 @@ Intended for use during debugging and for testing bidi display;
see biditest.el in the test suite. */);
inhibit_bidi_mirroring = false;
+ DEFVAR_BOOL ("bidi-inhibit-bpa", bidi_inhibit_bpa,
+ doc: /* Non-nil means inhibit the Bidirectional Parentheses Algorithm.
+Disabling the BPA makes redisplay faster, but might produce incorrect
+display reordering of bidirectional text with embedded parentheses and
+other bracket characters whose 'paired-bracket' Unicode property is
+non-nil, see `get-char-code-property'. */);
+ bidi_inhibit_bpa = false;
+
#ifdef GLYPH_DEBUG
DEFVAR_BOOL ("inhibit-try-window-id", inhibit_try_window_id,
doc: /* Inhibit try_window_id display optimization. */);