Mercurial > emacs
annotate admin/charsets/mule-charsets.el @ 90645:7eeafaaa9eab
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 476-489)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 153-160)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-127
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 30 Oct 2006 08:54:41 +0000 |
parents | e0e4e6a0599f |
children | 0151f4281d67 |
rev | line source |
---|---|
88123 | 1 ;; mule-charsets.el -- Generate Mule-orignal charset maps. |
2 ;; Copyright (C) 2003 | |
3 ;; National Institute of Advanced Industrial Science and Technology (AIST) | |
4 ;; Registration Number H13PRO009 | |
5 | |
6 ;; This file is part of GNU Emacs. | |
7 | |
8 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
9 ;; it under the terms of the GNU General Public License as published by | |
10 ;; the Free Software Foundation; either version 2, or (at your option) | |
11 ;; any later version. | |
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 | |
19 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
20 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
21 ;; Boston, MA 02111-1307, USA. | |
22 | |
23 (if (or (< emacs-major-version 21) | |
24 (< emacs-minor-version 3) | |
25 (and (= emacs-minor-version 3) | |
26 (string< emacs-version "21.3.50"))) | |
27 (error "Use Emacs of version 21.3.50 or later")) | |
28 | |
29 (defun func (start end) | |
30 (while (<= start end) | |
31 (let ((split (split-char start)) | |
32 (unicode (encode-char start 'ucs))) | |
33 (if unicode | |
34 (if (nth 2 split) | |
35 (insert (format "0x%02X%02X 0x%04X\n" | |
36 (nth 1 split) (nth 2 split) unicode)) | |
37 (insert (format "0x%02X 0x%04X\n" (nth 1 split) unicode))))) | |
38 (setq start (1+ start)))) | |
39 | |
40 (defconst charset-alist | |
41 '(("MULE-ethiopic.map" . ethiopic) | |
42 ("MULE-ipa.map" . ipa) | |
43 ("MULE-is13194.map" . indian-is13194) | |
44 ("MULE-sisheng.map" . chinese-sisheng) | |
45 ("MULE-tibetan.map" . tibetan) | |
46 ("MULE-lviscii.map" . vietnamese-viscii-lower) | |
47 ("MULE-uviscii.map" . vietnamese-viscii-upper))) | |
48 | |
49 (setq file (car command-line-args-left)) | |
50 (or (stringp file) | |
51 (error "Invalid file name: %s" file)) | |
52 (setq charset (cdr (assoc file charset-alist))) | |
53 (or charset | |
54 (error "Invalid charset: %s" (car command-line-args-left))) | |
55 | |
56 (with-temp-buffer | |
57 (map-charset-chars 'func charset) | |
58 (write-file file)) | |
89916
e0e4e6a0599f
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
88123
diff
changeset
|
59 |
e0e4e6a0599f
Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents:
88123
diff
changeset
|
60 ;;; arch-tag: 515989d7-2e2d-41cc-9163-05ad472fede4 |