1

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

(quail-define-rules
("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

(quail-define-rules
("a" ?s?o?m?t?h?i?n?g ))

(quail-define-rules
("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.

2

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"])
["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

something

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, privacy policy and cookie policy

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