help-gnu-emacs
[Top][All Lists]
Advanced

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

quail-define-package and guidance string


From: Rahguzar
Subject: quail-define-package and guidance string
Date: Tue, 10 Oct 2023 18:34:41 +0200
User-agent: mu4e 1.10.7; emacs 29.1

Hi,
I want to write and contribute to Emacs a couple of input methods for
Urdu. Looking around the already defined ones, it seems like
`quail-define-package` is the standard way to define these. One of the
input method uses phonetic transliteration. However Urdu has a bigger
alphabet than English and standard transliteration is quite lossy, so
there is a need to pick one of the translations and assign them to a key
and the others to a different key combination. As a result I want to
show such confusables in the echo area. It seems like it should be able
to use GUIDANCE arg of `quail-define-package` but setting it to an alist
has no effect for me. Specifically let say I have this code,

(quail-define-package
 "urdu-phonetic" "Urdu" "اردو صوتی"
 `((?a . "a → ا , A → آ , ax → أ , u → ع"))
 "Intuitive transliteration keyboard layout for Urdu."
 nil t t t t nil nil nil nil nil t)

(quail-define-rules
 ("a" ?ا)
 ("u" ?ع)
 ("i" ?ئ)
 ("A" ?آ)
 ("ax" ?أ))

Evaluating it defines the `urdu-phonetic` input method and I activate
and use it to input the characters above. However if I type 'a' the echo
area shows 'a[x]' i.e. the default behavior if the GUIDANCE arg was 't'
and the alist I passed to it is just ignored. Am I missing something in
the doc string? And is what I am trying to do possible?

Another related question: I don't understand the meaning of string or
vector type as the second entry of an argument of quail-define-rules.
The doc string states that in these cases a new quail map is generated
but I can't figure out what keys are bound on this map.

Thanks in advance,
Rahguzar



reply via email to

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