Mercurial > emacs
annotate lisp/language/lao.el @ 100381:070e432c7534
* xfns.c (Fx_wm_set_size_hint): Check if the frame is an X frame.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 13 Dec 2008 01:20:43 +0000 |
parents | 31c8c0a7d56c |
children | a9dc0e7c3f2b |
rev | line source |
---|---|
98037
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
1 ;;; lao.el --- support for Lao -*- coding: utf-8; no-byte-compile: t -*- |
17083 | 2 |
79710
d82b84af645c
Add missing FSF copyright years.
Glenn Morris <rgm@gnu.org>
parents:
78309
diff
changeset
|
3 ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
d82b84af645c
Add missing FSF copyright years.
Glenn Morris <rgm@gnu.org>
parents:
78309
diff
changeset
|
4 ;; Free Software Foundation, Inc. |
d82b84af645c
Add missing FSF copyright years.
Glenn Morris <rgm@gnu.org>
parents:
78309
diff
changeset
|
5 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
d82b84af645c
Add missing FSF copyright years.
Glenn Morris <rgm@gnu.org>
parents:
78309
diff
changeset
|
6 ;; 2007, 2008 |
62396 | 7 ;; National Institute of Advanced Industrial Science and Technology (AIST) |
8 ;; Registration Number H14PRO021 | |
89483 | 9 ;; Copyright (C) 2003 |
10 ;; National Institute of Advanced Industrial Science and Technology (AIST) | |
11 ;; Registration Number H13PRO009 | |
17083 | 12 |
13 ;; Keywords: multilingual, Lao | |
14 | |
15 ;; This file is part of GNU Emacs. | |
16 | |
94665
55b7f25d920a
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
17 ;; GNU Emacs is free software: you can redistribute it and/or modify |
17083 | 18 ;; it under the terms of the GNU General Public License as published by |
94665
55b7f25d920a
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
19 ;; the Free Software Foundation, either version 3 of the License, or |
55b7f25d920a
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
20 ;; (at your option) any later version. |
17083 | 21 |
22 ;; GNU Emacs is distributed in the hope that it will be useful, | |
23 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 ;; GNU General Public License for more details. | |
26 | |
27 ;; You should have received a copy of the GNU General Public License | |
94665
55b7f25d920a
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
28 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
17083 | 29 |
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
33778
diff
changeset
|
30 ;;; Commentary: |
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
33778
diff
changeset
|
31 |
17083 | 32 ;;; Code: |
33 | |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
34 (define-coding-system 'lao |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
35 "8-bit encoding for ASCII (MSB=0) and LAO (MSB=1)." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
36 :coding-type 'charset |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
37 :mnemonic ?L |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
38 :charset-list '(lao)) |
17083 | 39 |
40 (set-language-info-alist | |
22983
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
20739
diff
changeset
|
41 "Lao" '((charset lao) |
20739
5f2c7f919bbf
Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents:
20156
diff
changeset
|
42 (coding-system lao) |
5f2c7f919bbf
Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents:
20156
diff
changeset
|
43 (coding-priority lao) |
22983
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
20739
diff
changeset
|
44 (input-method . "lao") |
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
20739
diff
changeset
|
45 (unibyte-display . lao) |
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
20739
diff
changeset
|
46 (features lao-util) |
17841
084d922fcd78
Coding system names changed as follows:
Kenichi Handa <handa@m17n.org>
parents:
17772
diff
changeset
|
47 (documentation . t))) |
17083 | 48 |
98037
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
49 (let ((consonant "ກ-ຮໜໝ") |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
50 (tone "່-໌") |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
51 (vowel-upper-lower "ັິ-ົໍ") |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
52 (semivowel-lower "ຼ") |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
53 (fallback-rule [nil 0 compose-gstring-for-graphic])) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
54 ;; target characters regexp |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
55 ;; ----------------- ------ |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
56 (dolist (l `((,vowel-upper-lower . "[c].[t]?") |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
57 (,tone . "[c].") |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
58 (,semivowel-lower . "[c].[v][t]?") |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
59 (,semivowel-lower . "[c].[t]"))) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
60 (let* ((chars (car l)) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
61 (len (length chars)) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
62 ;; Replace `c', `t', `v' to consonant, tone, and vowel. |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
63 (regexp (mapconcat #'(lambda (c) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
64 (cond ((= c ?c) consonant) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
65 ((= c ?t) tone) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
66 ((= c ?v) vowel-upper-lower) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
67 (t (string c)))) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
68 (cdr l) "")) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
69 ;; Element of composition-function-table. |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
70 (elt (list (vector regexp 1 'lao-composition-function) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
71 fallback-rule)) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
72 ch) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
73 (dotimes (i len) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
74 (setq ch (aref chars i)) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
75 (if (and (> i 1) (= (aref chars (1- i)) ?-)) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
76 ;; End of character range. |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
77 (set-char-table-range composition-function-table |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
78 (cons (aref chars (- i 2)) ch) elt) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
79 (if (or (= (1+ i) len) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
80 (and (/= ch ?-) (/= (aref chars (1+ i)) ?-))) |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
81 ;; A character not forming a range. |
31c8c0a7d56c
Fix setting of composition-function-table.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
82 (set-char-table-range composition-function-table ch elt))))))) |
26893
78d4a8d767d5
Register lao-composition-function in
Kenichi Handa <handa@m17n.org>
parents:
23158
diff
changeset
|
83 |
33778 | 84 (provide 'lao) |
85 | |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
92178
diff
changeset
|
86 ;; arch-tag: ba540fd9-6352-4449-a9cd-669afd21fa57 |
17083 | 87 ;;; lao.el ends here |