From: Eli Zaretskii Date: Wed, 24 Aug 2011 11:49:54 +0000 (+0300) Subject: Fix current-bidi-paragraph-direction and its doc. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~70^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5980d4c6db923da523fbb0e2fb44ecd68b13c53d;p=emacs.git Fix current-bidi-paragraph-direction and its doc. src/xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte buffers, return left-to-right. doc/lispref/display.texi (Bidirectional Display): Document return value in buffers that are not bidi-reordered for display, and in unibyte buffers. --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 43add469ec0..4bf615328b1 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2011-08-24 Eli Zaretskii + + * display.texi (Bidirectional Display): Document return value in + buffers that are not bidi-reordered for display, and in unibyte + buffers. + 2011-08-23 Eli Zaretskii * nonascii.texi (Character Properties): Document the values for diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 8f7f4003411..0593eba8f05 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -6104,7 +6104,9 @@ omitted or @code{nil}, it defaults to the current buffer. If the buffer-local value of the variable @code{bidi-paragraph-direction} is non-@code{nil}, the returned value will be identical to that value; otherwise, the returned value reflects the paragraph direction -determined dynamically by Emacs. +determined dynamically by Emacs. For buffers whose value of +@code{bidi-display-reordering} is @code{nil} as well as unibyte +buffers, this function always returns @code{left-to-right}. @end defun @cindex layout on display, and bidirectional text diff --git a/src/ChangeLog b/src/ChangeLog index f52e8cad479..d4d6a4c4bbd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-08-24 Eli Zaretskii + * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte + buffers, return left-to-right. + * bidi.c (bidi_check_type): Use xassert. (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p members. diff --git a/src/xdisp.c b/src/xdisp.c index 6a11628f858..8b3a71027b6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -19014,7 +19014,8 @@ See also `bidi-paragraph-direction'. */) buf = XBUFFER (buffer); } - if (NILP (BVAR (buf, bidi_display_reordering))) + if (NILP (BVAR (buf, bidi_display_reordering)) + || NILP (BVAR (buf, enable_multibyte_characters))) return Qleft_to_right; else if (!NILP (BVAR (buf, bidi_paragraph_direction))) return BVAR (buf, bidi_paragraph_direction);