>>>> "Uwe" == Uwe Brauer
<oub(a)eucmos.sim.ucm.es> writes:
Uwe> Anyhow my question is simple but may be the answer is not so
Uwe> simple. It is possible to modify these functions such that
Uwe> the only applies for strings which have at least 2 characters
Uwe> however all the characters have to be in the octal
Uwe> representation > 127. That would mean that ASCII text remains
Uwe> unchanged but Hebrew text, > 127 will be changed. The
Uwe> function iso-unaccentuate does precisely this, ie changes
Uwe> only characters above 127. I tried to modify the reverse
Uwe> functions mentioned above accordingly, but without success.
I think that if you wrap one of the "invert-region" functions in
something like
;; In Mule, Hebrew characters in ISO-8859-8 do NOT have values in the
;; range 0xA1--0xFE inclusive. Maybe this is all you need?
(setq hebrew-character-class
(concat "["
(make-char 'hebrew-iso8859-8 ?!)
"-"
(make-char 'hebrew-iso8859-8 ?~)
"]"))
(setq not-hebrew-character-class
(concat "[^"
(make-char 'hebrew-iso8859-8 ?!)
"-"
(make-char 'hebrew-iso8859-8 ?~)
"]"))
;; Invert only Hebrew, leaving non-Hebrew alone.
(save-excursion
(while (re-search-forward hebrew-character-class (region-end) t)
(let ((begin (point))
(end (re-search-forward not-hebrew-character-class (region-end))))
(narrow-to-region begin end)
(invert-region begin end)
(widen))))
you will get something like what you want.
I know this is probably WRONG as written, because it will convert the
line
Hebrew ASCII Arabic --> werbeH ASCII cibarA
when what you presumably want is
Hebrew ASCII Arabic --> cibarA ASCII werbeH
Since I do not fully understand the rules for BIDI processing, I leave
fixing that to you.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."