Mercurial > emacs
annotate leim/quail/indian.el @ 46835:df25ef3d3237
Version 2.0.12 released.
(tramp-find-shell, tramp-open-connection-setup-interactive-shell):
Comment out possibly obsolete "echo hello" commands.
(tramp-run-real-handler): If operation is
`ange-ftp-hook-function', use first arg as the real operation.
(tramp-check-ls-commands): Use / instead of \ as directory
separator. (Relevant for XEmacs on Windows.)
(tramp-maybe-open-connection): Use tramp-wait-for-output when
waiting for the "are you awake" command. Use a different string
for the "are you awake" command.
(tramp-send-command): New optional arg NEVEROPEN means to never
invoke tramp-maybe-open-connection.
(tramp-maybe-open-connection): Use it
author | Kai Großjohann <kgrossjo@eu.uu.net> |
---|---|
date | Wed, 07 Aug 2002 14:54:05 +0000 |
parents | 79db4c465ef6 |
children | 9155d2fdd73c 552fd1c40da7 |
rev | line source |
---|---|
42293 | 1 ;;; indian.el --- Quail packages for inputting Indian |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
2 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
3 ;; Copyright (C) 2000, 2001 Free Software Foundation, Inc. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
4 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
5 ;; Author: KAWABATA, Taichi <kawabata@m17n.org> |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
6 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
7 ;; Keywords: multilingual, input method, Indian, Devanagari |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
8 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
10 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
11 ;; GNU Emacs is free software; you can redistribute it and/or modify |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
12 ;; it under the terms of the GNU General Public License as published by |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
13 ;; the Free Software Foundation; either version 2, or (at your option) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
14 ;; any later version. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
15 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
16 ;; GNU Emacs is distributed in the hope that it will be useful, |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
19 ;; GNU General Public License for more details. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
20 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
21 ;; You should have received a copy of the GNU General Public License |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
24 ;; Boston, MA 02111-1307, USA. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
25 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
26 ;;; Commentary: |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
27 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
28 ;; History: |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
29 |
42038 | 30 ;; 2000.12.12 |
31 ;; Totally re-written from devanagari.el to handle multiple Indian Scripts. | |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
32 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
33 ;;; Code: |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
34 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
35 (require 'quail) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
36 (require 'devan-util) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
37 (require 'ind-util) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
38 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
39 (defun quail-indian-preceding-char-position (position) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
40 "Return the position of preceding composite character." |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
41 (let (prec-composed) |
42038 | 42 (if (char-valid-p (char-before position)) ;; range o.k. |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
43 (if (setq prec-composed (find-composition (1- position))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
44 (car prec-composed) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
45 (1- position)) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
46 nil))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
47 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
48 (defvar quail-indian-update-preceding-char nil) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
49 (make-variable-frame-local 'quail-indian-update-preceding-char) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
50 |
42038 | 51 ;;; update function |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
52 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
53 ;; CONTROL-FLAG is integer (n) |
42038 | 54 ;; quail-current-key :: keyboard input. |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
55 ;; Only first n can be translated. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
56 ;; quail-current-string :: corresonding string. Translated when last |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
57 ;; time CONTROL-FLAG is nil. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
58 ;; todo :: (1) put last (len-n) char to unrread-command-event. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
59 ;; (2) put translated string to quail-current-string. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
60 ;; |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
61 ;; CONTROL-FLAG is t (terminate) or nil (proceed the translation) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
62 ;; quail-current-key :: keyboard input. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
63 ;; quail-current-string :: corresponding string. Created by database. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
64 ;; todo :: (1) put modified translated string to quail-current-string. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
65 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
66 (defun quail-indian-update-translation (control-flag) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
67 ;;(message "input control-flag=%s, string=%s, key=%s" |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
68 ;; control-flag quail-current-str quail-current-key) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
69 ;; make quail-current-str string when possible. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
70 (if (char-valid-p quail-current-str) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
71 (setq quail-current-str (char-to-string quail-current-str))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
72 ;; reset quail-indian-update-preceding-char if it's initial. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
73 (if (= (overlay-start quail-overlay) (overlay-end quail-overlay)) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
74 (setq quail-indian-update-preceding-char nil)) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
75 ;; set quial-indian-update-preceding-char if appropriate. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
76 (let* (prec-char-position composition-regexp |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
77 prec-char-str candidate-str match-pos match-end) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
78 (when (and quail-current-str |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
79 (null input-method-use-echo-area) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
80 (null input-method-exit-on-first-char) |
42038 | 81 (setq prec-char-position |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
82 (quail-indian-preceding-char-position |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
83 (overlay-start quail-overlay))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
84 (setq composition-regexp |
42038 | 85 (if prec-char-position |
86 (caar (elt composition-function-table | |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
87 (char-after prec-char-position))))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
88 ;; (null quail-indian-update-preceding-char) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
89 (setq prec-char-str |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
90 (buffer-substring prec-char-position |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
91 (overlay-start quail-overlay)) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
92 candidate-str (concat prec-char-str quail-current-str) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
93 match-pos (string-match composition-regexp candidate-str) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
94 match-end (match-end 0)) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
95 (> match-end (length prec-char-str))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
96 (setq quail-indian-update-preceding-char prec-char-str) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
97 (delete-region prec-char-position |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
98 (overlay-start quail-overlay)))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
99 ;; make quail-current-str string when possible. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
100 (if (null quail-current-str) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
101 (setq quail-current-str "")) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
102 ;; set quail-current-str unless control-flag is number. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
103 (if (numberp control-flag) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
104 (setq quail-indian-update-preceding-char nil |
42038 | 105 quail-current-str |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
106 (if (equal quail-current-str "") |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
107 (substring quail-current-key 0 control-flag) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
108 (indian-compose-string quail-current-str)) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
109 unread-command-events |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
110 (string-to-list |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
111 (substring quail-current-key control-flag))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
112 (if quail-indian-update-preceding-char |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
113 (setq quail-current-str |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
114 (concat quail-indian-update-preceding-char |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
115 quail-current-str))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
116 (setq quail-current-str |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
117 (indian-compose-string quail-current-str))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
118 (when (eq t control-flag) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
119 ;; reset preceding-char if translation is terminated. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
120 (setq quail-indian-update-preceding-char nil)) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
121 ;; compose to previous char if it looks possible. |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
122 ;;(message " out control-flag=%s, string=%s, key=%s" |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
123 ;; control-flag quail-current-str quail-current-key) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
124 control-flag) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
125 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
126 ;;; |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
127 ;;; Input by transliteration |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
128 ;;; |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
129 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
130 (defun quail-define-indian-trans-package (hashtbls pkgname |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
131 lang title doc) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
132 (funcall 'quail-define-package pkgname lang title t doc |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
133 nil nil nil nil nil nil t nil |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
134 'quail-indian-update-translation) |
42038 | 135 (maphash |
42463
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
136 (lambda (key val) |
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
137 (quail-defrule key (if (= (length val) 1) |
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
138 (string-to-char val) |
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
139 (vector val)))) |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
140 (cdr hashtbls))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
141 |
44699
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
142 ;; This needs to be seen by quail-update-leim-list-file, but cannot be |
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
143 ;; commented out because quail-update-leim-list-file ignores |
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
144 ;; commented-out lines. |
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
145 (if nil |
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
146 (quail-define-package "devanagari-itrans" "Devanagari" "DevIT" t "Devanagari ITRANS")) |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
147 (quail-define-indian-trans-package |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
148 indian-dev-itrans-v5-hash "devanagari-itrans" "Devanagari" "DevIT" |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
149 "Devanagari transliteration by ITRANS method.") |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
150 |
44699
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
151 (if nil |
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
152 (quail-define-package "devanagari-kyoto-harvard" "Devanagari" "DevKH" t "Devanagari Kyoto-Harvard")) |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
153 (quail-define-indian-trans-package |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
154 indian-dev-kyoto-harvard-hash |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
155 "devanagari-kyoto-harvard" "Devanagari" "DevKH" |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
156 "Devanagari transliteration by Kyoto-Harvard method.") |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
157 |
44699
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
158 (if nil |
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
159 (quail-define-package "devanagari-aiba" "Devanagari" "DevAB" t "Devanagari Aiba")) |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
160 (quail-define-indian-trans-package |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
161 indian-dev-aiba-hash "devanagari-aiba" "Devanagari" "DevAB" |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
162 "Devanagari transliteration by Aiba-method.") |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
163 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
164 ;;; |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
165 ;;; Input by Inscript |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
166 ;;; |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
167 |
42038 | 168 (defun quail-indian-flatten-list (lst) |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
169 "Flatten the nested LIST so that there would be no innner list." |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
170 (if (listp lst) |
42038 | 171 (apply 'append (mapcar 'quail-indian-flatten-list lst)) |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
172 (list lst))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
173 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
174 (defun quail-define-inscript-package (char-table key-table pkgname lang title |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
175 docstring) |
42038 | 176 (setq char-table (quail-indian-flatten-list char-table)) |
177 (setq key-table (quail-indian-flatten-list key-table)) | |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
178 (funcall 'quail-define-package pkgname lang title nil docstring |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
179 nil nil nil nil nil nil nil nil |
42463
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
180 'quail-indian-update-translation) |
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
181 (dolist (key key-table) |
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
182 (let ((val (pop char-table))) |
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
183 (if (and key val) |
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
184 (quail-defrule |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
185 (if (char-valid-p key) (char-to-string key) key) |
42463
87a33bffaf3c
(quail-define-indian-trans-package): Unquote
Dave Love <fx@gnu.org>
parents:
42293
diff
changeset
|
186 (if (stringp val) (vector val) val)))))) |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
187 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
188 ;; |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
189 |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
190 (defvar inscript-dev-keytable |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
191 '( |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
192 (;; VOWELS (18) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
193 (?D nil) (?E ?e) (?F ?f) (?R ?r) (?G ?g) (?T ?t) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
194 (?+ ?=) ("F]" "f]") (?! ?@) (?Z ?z) (?S ?s) (?W ?w) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
195 (?| ?\\) (?~ ?`) (?A ?a) (?Q ?q) ("+]" "=]") ("R]" "r]")) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
196 (;; CONSONANTS (42) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
197 ?k ?K ?i ?I ?U ;; GRUTTALS |
42038 | 198 ?\; ?: ?p ?P ?} ;; PALATALS |
199 ?' ?\" ?\[ ?{ ?C ;; CEREBRALS | |
200 ?l ?L ?o ?O ?v ?V ;; DENTALS | |
201 ?h ?H ?y ?Y ?c ;; LABIALS | |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
202 ?/ ?j ?J ?n ?N "N]" ?b ;; SEMIVOWELS |
42038 | 203 ?M ?< ?m ?u ;; SIBILANTS |
204 "k]" "K]" "i]" "p]" "[]" "{]" "H]" "/]" ;; NUKTAS | |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
205 ?% ?&) |
42038 | 206 (;; Misc Symbols (7) |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
207 ?X ?x ?_ ">]" ?d "X]" ?>) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
208 (;; Digits |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
209 ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
210 (;; Inscripts |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
211 ?# ?$ ?^ ?* ?\]))) |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
212 |
44699
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
213 (if nil |
79db4c465ef6
Replace commented-out lines with a condition that is always false.
Eli Zaretskii <eliz@gnu.org>
parents:
42463
diff
changeset
|
214 (quail-define-package "devanagari-inscript" "Devanagari" "DevIS" t "Devanagari keyboard Inscript")) |
42038 | 215 (quail-define-inscript-package |
41464
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
216 indian-dev-base-table inscript-dev-keytable |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
217 "devanagari-inscript" "Devanagari" "DevIS" |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
218 "Devanagari keyboard Inscript.") |
93957ea66b86
Renamed from devanagari.el, and completely re-written.
Richard M. Stallman <rms@gnu.org>
parents:
diff
changeset
|
219 |
42293 | 220 ;;; indian.el ends here |