[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: quail inserts raw characters on unfinished sequences
From: |
Juri Linkov |
Subject: |
Re: quail inserts raw characters on unfinished sequences |
Date: |
Tue, 25 Oct 2005 19:17:33 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
>> Maybe, quail should try to restart the whole input loop to interpret
>> remaining latin "c"?
>
> Right! I've just installed a fix for quail.el.
Thinks to your efforts, but it doesn't work. Nothing changes for the
case I described, because the condition in `quail-translate-key':
;; No translation for the longer key.
(null (cdr map))
returns nil (i.e. there is a translation for the longer key), so your
added code doesn't run.
I looked a bit at quail.el and managed to change it to work with the
described case using the fix below. Please review this fix very
carefully, since I am not familiar with the quail code at all, and
it may break something else.
Index: lisp/international/quail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/quail.el,v
retrieving revision 1.144
diff -c -r1.144 quail.el
*** lisp/international/quail.el 25 Oct 2005 06:10:23 -0000 1.144
--- lisp/international/quail.el 25 Oct 2005 16:16:48 -0000
***************
*** 1601,1610 ****
(let ((str (quail-get-current-str
(1- len)
(quail-map-definition (quail-lookup-key
! quail-current-key (1- len))))))
(if str
(concat (if (stringp str) str (char-to-string str))
! (substring quail-current-key (1- len) len)))))))
(defvar quail-guidance-translations-starting-column 20)
--- 1601,1614 ----
(let ((str (quail-get-current-str
(1- len)
(quail-map-definition (quail-lookup-key
! quail-current-key (1- len)))))
! (str1 (quail-map-definition (quail-lookup-key
! (substring quail-current-key
! (1- len) len)
! 1))))
(if str
(concat (if (stringp str) str (char-to-string str))
! (if (stringp str1) str1 (char-to-string str1))))))))
(defvar quail-guidance-translations-starting-column 20)
--
Juri Linkov
http://www.jurta.org/emacs/