Mercurial > emacs
annotate admin/charsets/mule-charsets.el @ 102366:93b10d2621d3
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1561
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 03 Mar 2009 02:32:23 +0000 |
parents | ce88a631c161 |
children | afce89bcee41 |
rev | line source |
---|---|
88123 | 1 ;; mule-charsets.el -- Generate Mule-orignal charset maps. |
100971 | 2 ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
88123 | 3 ;; National Institute of Advanced Industrial Science and Technology (AIST) |
4 ;; Registration Number H13PRO009 | |
5 | |
6 ;; This file is part of GNU Emacs. | |
7 | |
94832
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91419
diff
changeset
|
8 ;; GNU Emacs is free software: you can redistribute it and/or modify |
88123 | 9 ;; it under the terms of the GNU General Public License as published by |
94832
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91419
diff
changeset
|
10 ;; the Free Software Foundation, either version 3 of the License, or |
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91419
diff
changeset
|
11 ;; (at your option) any later version. |
88123 | 12 |
13 ;; GNU Emacs is distributed in the hope that it will be useful, | |
14 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 ;; GNU General Public License for more details. | |
17 | |
18 ;; You should have received a copy of the GNU General Public License | |
94832
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91419
diff
changeset
|
19 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
eb2d9dfc8486
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91419
diff
changeset
|
20 |
88123 | 21 |
22 (if (or (< emacs-major-version 21) | |
23 (< emacs-minor-version 3) | |
24 (and (= emacs-minor-version 3) | |
25 (string< emacs-version "21.3.50"))) | |
26 (error "Use Emacs of version 21.3.50 or later")) | |
27 | |
28 (defun func (start end) | |
29 (while (<= start end) | |
30 (let ((split (split-char start)) | |
31 (unicode (encode-char start 'ucs))) | |
32 (if unicode | |
33 (if (nth 2 split) | |
91419
0151f4281d67
Update copyright years and GPL version.
Glenn Morris <rgm@gnu.org>
parents:
89916
diff
changeset
|
34 (insert (format "0x%02X%02X 0x%04X\n" |
88123 | 35 (nth 1 split) (nth 2 split) unicode)) |
36 (insert (format "0x%02X 0x%04X\n" (nth 1 split) unicode))))) | |
37 (setq start (1+ start)))) | |
38 | |
39 (defconst charset-alist | |
40 '(("MULE-ethiopic.map" . ethiopic) | |
41 ("MULE-ipa.map" . ipa) | |
42 ("MULE-is13194.map" . indian-is13194) | |
43 ("MULE-sisheng.map" . chinese-sisheng) | |
44 ("MULE-tibetan.map" . tibetan) | |
45 ("MULE-lviscii.map" . vietnamese-viscii-lower) | |
46 ("MULE-uviscii.map" . vietnamese-viscii-upper))) | |
47 | |
48 (setq file (car command-line-args-left)) | |
49 (or (stringp file) | |
50 (error "Invalid file name: %s" file)) | |
51 (setq charset (cdr (assoc file charset-alist))) | |
52 (or charset | |
53 (error "Invalid charset: %s" (car command-line-args-left))) | |
54 | |
55 (with-temp-buffer | |
56 (map-charset-chars 'func charset) | |
57 (write-file file)) | |
89916
e0e4e6a0599f
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
88123
diff
changeset
|
58 |
e0e4e6a0599f
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
88123
diff
changeset
|
59 ;;; arch-tag: 515989d7-2e2d-41cc-9163-05ad472fede4 |