From 9ccaaa4be77d1698784cceb983ef987cc80212c2 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 12 Aug 2011 11:43:30 -0400 Subject: Fix behavior of string-mark-left-to-right. * lisp/subr.el (string-mark-left-to-right): Search the entire string for RTL script, not just the terminating character. Doc fix. --- etc/NEWS | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'etc') diff --git a/etc/NEWS b/etc/NEWS index 6f8c125f7f..1a788e7f6f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1038,11 +1038,15 @@ of function value which looks like (closure ENV ARGS &rest BODY). *** New function `special-variable-p' to check whether a variable is declared as dynamically bound. -** New function `string-mark-left-to-right' appends a Unicode LRM -(left-to-right mark) character to a string if it terminates in -right-to-left script. This is useful when the buffer has overall -left-to-right paragraph direction and you need to insert a string -whose contents (and directionality) are not known in advance. +** New function `string-mark-left-to-right'. +Given a string containing right-to-left (RTL) script, this function +returns another string with a terminating LRM (left-to-right mark) +character. If this string is inserted into a buffer, Emacs treats the +LRM as the end of an RTL segment and displays following text as LTR. + +This is useful when the buffer has overall left-to-right (LTR) +paragraph direction and you need to insert a string whose contents +(and hence directionality) are not known in advance. ** pre/post-command-hook are not reset to nil upon error. Instead, the offending function is removed. -- cgit v1.2.3