aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-11-06 20:21:52 +0200
committerEli Zaretskii2011-11-06 20:21:52 +0200
commit88a37c4d87ec916146430bfef0a5e90f175b6a2e (patch)
tree268cb8138f5d2640ff56350bbbfe09fc79d2beed /src
parent291d142b33ae732328c61c89e3680f63266d073a (diff)
downloademacs-88a37c4d87ec916146430bfef0a5e90f175b6a2e.tar.gz
emacs-88a37c4d87ec916146430bfef0a5e90f175b6a2e.zip
Fix bug #9963 with abort in "temacs -nw".
src/xdisp.c (init_iterator, reseat_to_string): Don't set the iterator's bidi_p flag if Vpurify_flag is non-nil. (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil, return Qleft_to_right.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/xdisp.c21
2 files changed, 23 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 12e9a5c9e57..e393da21cc2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12011-11-06 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (init_iterator, reseat_to_string): Don't set the
4 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
5 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
6 return Qleft_to_right.
7
12011-11-06 Chong Yidong <cyd@gnu.org> 82011-11-06 Chong Yidong <cyd@gnu.org>
2 9
3 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window) 10 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
diff --git a/src/xdisp.c b/src/xdisp.c
index f358cdd6270..197fb748598 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2763,9 +2763,13 @@ init_iterator (struct it *it, struct window *w,
2763 /* Do we need to reorder bidirectional text? Not if this is a 2763 /* Do we need to reorder bidirectional text? Not if this is a
2764 unibyte buffer: by definition, none of the single-byte 2764 unibyte buffer: by definition, none of the single-byte
2765 characters are strong R2L, so no reordering is needed. And 2765 characters are strong R2L, so no reordering is needed. And
2766 bidi.c doesn't support unibyte buffers anyway. */ 2766 bidi.c doesn't support unibyte buffers anyway. Also, don't
2767 reorder while we are loading loadup.el, since the tables of
2768 character properties needed for reordering are not yet
2769 available. */
2767 it->bidi_p = 2770 it->bidi_p =
2768 !NILP (BVAR (current_buffer, bidi_display_reordering)) 2771 NILP (Vpurify_flag)
2772 && !NILP (BVAR (current_buffer, bidi_display_reordering))
2769 && it->multibyte_p; 2773 && it->multibyte_p;
2770 2774
2771 /* If we are to reorder bidirectional text, init the bidi 2775 /* If we are to reorder bidirectional text, init the bidi
@@ -6136,8 +6140,12 @@ reseat_to_string (struct it *it, const char *s, Lisp_Object string,
6136 it->multibyte_p = multibyte > 0; 6140 it->multibyte_p = multibyte > 0;
6137 6141
6138 /* Bidirectional reordering of strings is controlled by the default 6142 /* Bidirectional reordering of strings is controlled by the default
6139 value of bidi-display-reordering. */ 6143 value of bidi-display-reordering. Don't try to reorder while
6140 it->bidi_p = !NILP (BVAR (&buffer_defaults, bidi_display_reordering)); 6144 loading loadup.el, as the necessary character property tables are
6145 not yet available. */
6146 it->bidi_p =
6147 NILP (Vpurify_flag)
6148 && !NILP (BVAR (&buffer_defaults, bidi_display_reordering));
6141 6149
6142 if (s == NULL) 6150 if (s == NULL)
6143 { 6151 {
@@ -19460,7 +19468,10 @@ See also `bidi-paragraph-direction'. */)
19460 } 19468 }
19461 19469
19462 if (NILP (BVAR (buf, bidi_display_reordering)) 19470 if (NILP (BVAR (buf, bidi_display_reordering))
19463 || NILP (BVAR (buf, enable_multibyte_characters))) 19471 || NILP (BVAR (buf, enable_multibyte_characters))
19472 /* When we are loading loadup.el, the character property tables
19473 needed for bidi iteration are not yet available. */
19474 || !NILP (Vpurify_flag))
19464 return Qleft_to_right; 19475 return Qleft_to_right;
19465 else if (!NILP (BVAR (buf, bidi_paragraph_direction))) 19476 else if (!NILP (BVAR (buf, bidi_paragraph_direction)))
19466 return BVAR (buf, bidi_paragraph_direction); 19477 return BVAR (buf, bidi_paragraph_direction);