emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bidi-display-reordering is now non-nil by default


From: Chong Yidong
Subject: Re: bidi-display-reordering is now non-nil by default
Date: Tue, 09 Aug 2011 12:07:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Seriously, though: why do you need any conditions here?  An LRM will
> have no effect if str is not reordered, so why not put it there
> unconditionally?

Suppose a user kills some text from a Gnus summary buffer which contains
these LRM characters, and yanks it into a latin-1 file.  Suddenly, that
file can't be saved, even though there is no non-latin-1 script in the
buffer clearly visible.

If we can trivially avoid most such occurrences, why not do so?

> But if you insist on doing that only when str might need that, then I
> think you want to check each character in str with
> get-char-code-property, like this:
>
>   (get-char-code-property (aref str i) 'bidi-class)
>
> If this returns 'R for any character, it means the string _might_ need
> LRM to be appended.

OK, let's go with this unless someone comes up with a better idea.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]