unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* devanagari diacritics
@ 2013-10-23  3:12 Rustom Mody
  2013-10-23 12:22 ` David De La Harpe Golden
  2013-10-23 13:42 ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Rustom Mody @ 2013-10-23  3:12 UTC (permalink / raw)
  To: emacs-devel

There have been a couple of independent questions on help.gnu.emacs
for typing devanagari-as-diacritics in the last couple of weeks.
Emacs as of now comes with a couple of devanagari modes for typing
devanagari but not romanized diacritics for devanagari.

Firstly, does something like this exist?

In any case, I came up with the following:
There is one thing I dont know how to do -- how do you make an rule
that expands to more than one character. For example we may want "c"
to expand to "ch"
-----------------------
(require 'quail)

(quail-define-package
 "devanagari-diacritic" "UTF-8" "अ" t
 "Example diacritic

" nil t t nil t nil nil nil nil nil t)
;; no much idea what all these nil/t's are
;; just copied it from something David de la Harpe Golden wrote

(defvar devanagari-map
  '(("A"  ?ā)
    ("I"  ?ī)
    ("U"  ?ū)
    ("~N" ?ṅ)
    ("~n" ?ñ)
    ("N"  ?ṇ)
    ("T"  ?ṭ)
    ("D"  ?ḍ)
    ("sh" ?ś)
    ("Sh" ?ṣ)
))

(defun quail-block-defrules (kb quail-package)
  (dolist (key-trans devanagari-map)
    (let ((key (car key-trans))
      (trans (cadr key-trans)))
      (quail-defrule key trans quail-package))))

(quail-block-defrules devanagari-map "devanagari-diacritic")

-----------

Rusi


-- 
http://www.the-magus.in
http://blog.languager.org



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-28 14:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-23  3:12 devanagari diacritics Rustom Mody
2013-10-23 12:22 ` David De La Harpe Golden
2013-10-23 13:42 ` Stefan Monnier
2013-10-23 14:05   ` Rustom Mody
2013-10-23 18:27     ` Stefan Monnier
2013-10-24  2:36       ` Rustom Mody
2013-10-24  3:36         ` Stefan Monnier
2013-10-28 13:21   ` Rustom Mody
2013-10-28 14:47     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).