aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2011-08-25 13:45:33 +0300
committerEli Zaretskii <[email protected]>2011-08-25 13:45:33 +0300
commit0c95fcf739dbfbae70f4e4700fdafedb4497e8df (patch)
treef27c148c083aa9a6d290053b26ac8e45bfdcb07a /doc
parenta2ebe600c947152c10bf657dfb9dfabdb601c766 (diff)
Handle `(space ...)' display spec as paragraph separator.
src/xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when the display spec is of the form `(space ...)'. (handle_display_spec): Return the value returned by handle_single_display_spec, not just 1 or zero. (handle_single_display_spec): If the display spec is of the form `(space ...)', and specifies display in the text area, return 2 rather than 1. src/dispextern.h (struct bidi_it): Rename the disp_prop_p member into disp_prop; all users changed. src/bidi.c (bidi_fetch_char): If compute_display_string_pos returns DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character for the text covered by the display property. lisp/buff-menu.el (Buffer-menu-buffer+size): Remove calls to bidi-string-mark-left-to-right; they are unnecessary now. doc/lispref/display.texi (Specified Space): Mention that `space' specs influence bidi reordering. (Bidirectional Display): Explain how to use `(space . PROPS)' for separating fields with bidirectional content.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/display.texi17
2 files changed, 22 insertions, 2 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 4bf615328b..ca9c93b563 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-25 Eli Zaretskii <[email protected]>
+
+ * display.texi (Specified Space): Mention that `space' specs
+ influence bidi reordering.
+ (Bidirectional Display): Explain how to use `(space . PROPS)' for
+ separating fields with bidirectional content.
+
2011-08-24 Eli Zaretskii <[email protected]>
* display.texi (Bidirectional Display): Document return value in
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 0593eba8f0..bf7cd126a2 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3794,6 +3794,10 @@ with a @dfn{pixel ascent} specification (@pxref{Pixel Specification}).
non-graphic terminals, but the other space properties in this section
are not.
+ Note that space properties are treated as paragraph separators for
+the purposes of reordering bidirectional text for display.
+@xref{Bidirectional Display}, for the details.
+
@node Pixel Specification
@subsection Pixel Specification for Spaces
@cindex spaces, pixel specification
@@ -6126,8 +6130,8 @@ with bidirectional content can be displayed @emph{to the left} of the
preceding field, producing a jumbled display and messing up the
expected layout.
- To countermand this, you can use one of the following techniques for
-forcing correct order of fields on display:
+ To countermand this, we recommend that you use one of the following
+techniques for forcing correct order of fields on display:
@itemize @minus
@item
@@ -6146,6 +6150,15 @@ Include the tab character in the field separator. The tab character
plays the role of @dfn{segment separator} in the @acronym{UBA}
reordering, whose effect is to make each field a separate segment, and
thus reorder them separately.
+
+@cindex @code{space} display spec, and bidirectional text
+@item
+Separate fields with a @code{display} property or overlay with the
+property value of the form @code{(space . PROPS)} (@pxref{Specified
+Space}). This display specification is treated by Emacs as a
+@dfn{paragraph separator}; the text before and after the separator is
+reordered separately, which avoids the influence of any field on its
+neighboring fields.
@end itemize
@defun bidi-string-mark-left-to-right string