From cc3b8e1b0ecf7dca67246878f9374780685f0f5d Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 13 Jul 2019 12:11:19 +0200 Subject: [PATCH] Add warning to bidi-display-reordering doc string This explanation was given by Eli Zaretskii on emacs-devel. For discussion, see: https://lists.gnu.org/archive/html/emacs-devel/2019-07/msg00294.html * src/buffer.c (syms_of_buffer): Add warning to doc string of bidi-display-reordering to explain it could be dangerous in a production session. --- src/buffer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 209e29f0f1..9b978c131e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5659,8 +5659,12 @@ syms_of_buffer (void) DEFVAR_PER_BUFFER ("bidi-display-reordering", &BVAR (current_buffer, bidi_display_reordering), Qnil, - doc: /* Non-nil means reorder bidirectional text for display in the visual order. */); - + doc: /* Non-nil means reorder bidirectional text for display in the visual order. +WARNING: This variable is useful for debugging the display code, but +using it in a production session is dangerous, because its puts the +display engine in a state that is not being tested. It can cause +inconsistencies and even bugs (because some portions of the code were +written under the assumption that this variable is never nil). */); DEFVAR_PER_BUFFER ("bidi-paragraph-start-re", &BVAR (current_buffer, bidi_paragraph_start_re), Qnil, doc: /* If non-nil, a regexp matching a line that starts OR separates paragraphs. -- 2.11.0