Fix previous change.
[bpt/emacs.git] / lisp / international / subst-jis.el
CommitLineData
d7136fd3 1;;; subst-jis.el --- Unicode/JISX translation -*-coding: euc-jp;-*-
9e24a165 2;; Copyright (C) 2002, 2004 Free Software Foundation, Inc.
d7136fd3
DL
3
4;; Author: Dave Love <fx@gnu.org>
5;; Keywords: i18n
6
7;; This file is free software; you can redistribute it and/or modify
8;; it under the terms of the GNU General Public License as published by
9;; the Free Software Foundation; either version 2, or (at your option)
10;; any later version.
11
12;; This file is distributed in the hope that it will be useful,
13;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;; GNU General Public License for more details.
16
17;; You should have received a copy of the GNU General Public License
18;; along with GNU Emacs; see the file COPYING. If not, write to
19;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20;; Boston, MA 02111-1307, USA.
21
22;;; Commentary:
23
24;; Provides translation tables between Unicode and
25;; japanese-jisx0208/japanese-jisx0212 charsets for use by the
9e24a165 26;; `utf-translate-cjk-mode' option.
d7136fd3
DL
27
28;;; Code:
29
30;; Derived in Emacs 22 using
31;; (map-charset-chars
32;; (lambda (range arg)
33;; (let ((i (car range))
34;; c)
35;; (while (<= i (cdr range))
36;; (setq c (encode-char i 'ucs))
37;; (if c
38;; (if (or (memq (char-syntax c) '(?\( ?\" ?\) ?\;))
39;; (insert "(" (format "#x%x ?\\%c" c c) ")\n")
40;; (insert "(" (format "#x%x ?%c" c c) ")\n")))
41;; (setq i (1+ i))))))
42;; 'japanese-jisx0208)
43;; and similarly.
44
45(mapc
46 (lambda (pair)
47 (let ((unicode (car pair))
e41ef4d4
KH
48 (char (cadr pair))
49 (tail utf-translate-cjk-unicode-range))
50 ;; exclude non-supporting components from decode table
51 (if (utf-translate-cjk-substitutable-p unicode)
52 (puthash unicode char ucs-unicode-to-mule-cjk))
d7136fd3
DL
53 (puthash char unicode ucs-mule-cjk-to-unicode)))
54 '(
55 ;; jisx0208
56