annotate lisp/language/burmese.el @ 110971:80846b446563

lisp/subr.el (last): Use `safe-length' instead of `length' (bug#7206).
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 14 Oct 2010 01:15:03 +0200
parents b1fd8a6d130f
children 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
91378
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; burmese.el --- support for Burmese -*- coding: utf-8; no-byte-compile: t -*-
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
3 ;; Copyright (C) 2008, 2009, 2010
91378
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 ;; National Institute of Advanced Industrial Science and Technology (AIST)
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;; Registration Number H13PRO009
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 ;; Keywords: multilingual, Burma, i18n
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
94665
55b7f25d920a Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93768
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
91378
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; 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: 93768
diff changeset
13 ;; 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: 93768
diff changeset
14 ;; (at your option) any later version.
91378
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 ;; 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: 93768
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
91378
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 ;;; Commentary:
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 ;; Aung San Suu Kyi says to call her country "Burma".
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;; The murderous generals say to call it "Myanmar".
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 ;; We will call it "Burma". -- rms, Chief GNUisance.
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 ;;; Code:
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 (set-language-info-alist
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 "Burmese" '((charset unicode)
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 (coding-system utf-8)
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 (coding-priority utf-8)
93768
c93598fddc46 ("Burmese"): Make sample text consistent with language name.
Jason Rumney <jasonr@gnu.org>
parents: 91378
diff changeset
36 (sample-text . "Burmese (မ္ရန္‌မာ) မင္‍ဂလာပာ")
91378
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 (documentation . t)))
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38
107307
b1fd8a6d130f Change "myanmar" to "burmese"
Kenichi Handa <handa@m17n.org>
parents: 107237
diff changeset
39 (defvar burmese-composable-pattern
107237
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
40 (let ((table
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
41 '(("K" . "[\u1004\u105A]\u103A\u1039") ; KINZI sequence
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
42 ("C" . "[\u1000-\u102A\u103F\u1041-\u1049\u104E\u105A-\u105D\u1061\u1065-\u1066\u106E\u1071\u1075\u1081\u108E\uAA60-\uAA6F\uAA71-\uAA76]") ; consonant and vowel letter
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
43 ("V" . "\u1039") ; VIRAMA
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
44 ("A" . "\u103A") ; ASAT
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
45 ("S" . "[\u1000-\u1019\u101C\u101E\u1020\u1021\u105A]") ; subscript
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
46 ("M" . "[\u103B-\u103E\105E-\1060]") ; medial
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
47 ("v" . "[\u102B-\u103A\u103C-\u103E\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A\u109C\uAA70]"))) ; vowel sign, etc.
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
48 (regexp "\\(K\\)?C\\(VS\\)?\\(VS\\)?A?M*v*"))
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
49 (let ((case-fold-search nil))
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
50 (dolist (elt table)
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
51 (setq regexp (replace-regexp-in-string (car elt) (cdr elt)
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
52 regexp t t))))
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
53 regexp))
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
54
107307
b1fd8a6d130f Change "myanmar" to "burmese"
Kenichi Handa <handa@m17n.org>
parents: 107237
diff changeset
55 (let ((elt (list (vector burmese-composable-pattern 0 'font-shape-gstring)
107237
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
56 (vector "." 0 'font-shape-gstring))))
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
57 (set-char-table-range composition-function-table '(#x1000 . #x107F) elt)
f24a9a68524d Fix Myanmar OTF support
Kenichi Handa <handa@m17n.org>
parents: 106815
diff changeset
58 (set-char-table-range composition-function-table '(#xAA60 . #xAA7B) elt))
91378
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59
8d3c0976b01f *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 ;; arch-tag: 8ba5f4cd-ef89-4008-b784-397edd0cb32e