1

I am running Emacs mac ports (24.5) on a Macbook Air. I have the following code as an .el file to setup my own multilingual environment:

(require 'quail)

(quail-define-package "maatra"
                      "UTF-8" "m" t
                      "Input method for Roman transliteration of Devanāgarī using IAST scheme. E.g. aa -> ā"
                      nil t nil nil nil nil nil nil nil nil t)

(quail-define-rules ("aa" ?\ā)
                    ("AA" ?\Ā)
                    ("ii" ?\ī)
                    ("II" ?\Ī)
                    ("uu" ?\ū)
                    ("UU" ?\Ū)
                    (".r" ?\ṛ)
                    (".R" ?\Ṛ)
                    (".rr" ?\ṝ)
                    (".RR" ?\Ṝ)
                    (".l" ?\ḷ)
                    (".L" ?\Ḷ)
                    (".ll" ?\ḹ)
                    (".LL" ?\Ḹ)
                    (".M" ?\ṁ)
                    (".m" ?\ṃ)
                    (".h" ?\ḥ)
                    (".H" ?\Ḥ)
                    (";n" ?\ṅ)
                    (";N" ?\Ṅ)
                    ("~n" ?\ñ)
                    ("~N" ?\Ñ)
                    (".t" ?\ṭ)
                    (".T" ?\Ṭ)
                    (".d" ?\ḍ)
                    (".D" ?\Ḍ)
                    (".n" ?\ṇ)
                    (".N" ?\Ṇ)
                    (";s" ?\ś)
                    (";S" ?\Ś)
                    (".s" ?\ṣ)
                    (".S" ?\Ṣ)
                    ;;("dd" ?\d̤)
                    )

        (provide 'maatra)

I am facing two problems:

  1. I receive the error 'Invalid read syntax: ?' only when I uncomment the last line above. Else the code works perfectly. Emacs has no problem with any other character except d̤.
  2. Emacs is even unable to properly display the d̤ character except when I use the Monaco font. Other fonts like Dejavu Mono which perfectly display this character in other applications do not render it properly in Emacs. Typically, the adjacent characters overlap this character and the text becomes unreadable.

How do I fix the problem with the character?

1 Answer 1

1

The is the only character in there which isn't pre-composed; it's a normal LATIN SMALL LETTER D followed by a COMBINING DIAERESIS BELOW. That makes it a syntax error because a character literal can only be a single character. quail-define-rules will also accept strings so use "d̤" instead.

1
  • Thanks! However, it has to be in square brackets. Therefore, the correct syntax for the last line would be ("dd" ["d̤"]). Any idea why only particular fonts seem to work well in Emacs, though they work fine elsewhere?
    – latex_guy
    Jan 28, 2016 at 18:04

Your Answer

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

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