Uwe Brauer writes:
The cursor is blocked on the left side and the letters just appear.
This sounds like visual hebrew, but it is not, it is logical hebrew
with a simpler input interface. Would that be (considerable)
easier to implement in Xemacs?
You mean something like this (each line represents a new state of the
*same* line in the display after each keystroke, while _ represents
the cursor):
_s
_hs
_ahs
_lahs
_olahs
_molahs
Yes, that should be easy enough to implement in XEmacs.
(defun hebrew-after-change (begin end old-length)
"If a Hebrew character was apparently inserted, move cursor before it."
(when (and (= 1 (- end begin)) ; these two conditions make it highly
(= 0 old-length) ; likely the last command was a self-insert
(eq 'hebrew-iso8859-8 (char-charset (char-after begin))))
(backward-char 1)))
(add-to-list 'after-change-functions 'hebrew-after-change)
This implementation has a number of problems, I'm pretty sure, but
probably it won't get in your way in non-Hebrew buffers. The problems
I can think of offhand are that after-change-functions is permanent
buffer local, so you probably have to do this in every buffer where
you want to use it, and it can be fooled by other commands that do
insertions (and in particular it's probably possible that (point) !=
end, so you may get a little weird behavior from the cursor if some
program yanks a single character).
If that sort of works for you, we can talk about improving it. I
think I already know how to solve both of the problems above, but this
is just a proof of concept that I haven't time to test myself. And
I'm not confident there aren't loads of other problems. ;-)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta