The standard way to define an abbreviation using quail is as follows:

("a" ?s ))

Inserting "a" gives "s".

I am wondering if one can insert an arbitrary string using quail, I tried the following but do not work

("a" ?s?o?m?t?h?i?n?g ))

("a" "something" ))

I know there are other methods to achieve this (e.g., abbrev-mode) but I am interested if there is way to do it using quail.

Update If one uses ("a" "something" ), typing a inserts s and ignores omething.

1 Answer 1


Using quail-define-rules is overkill (note the rules, plural, in the function name) — an alternative is quail-defrule (one rule...)

Directly from my scratch buffer

(quail-defrule "á" ["something"])

— note that it's not (quail-defrule "á" "something"), to do what you want the string must be an element of a vector (ref. C-h f quail-defrule RET) — then I typed á and I got


I have to mention that my knowledge in these matters is solely due to (is stolen from...) this answer from Stefan.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.