1 ;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*-
3 ;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
5 ;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
6 ;; Keywords: multilingual, i18n, Indian
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
27 ;; This file defines in-is13194 coding system and relationship between
28 ;; indian-glyph character-set and various CDAC fonts.
34 "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)."
35 '(ascii indian-is13194 nil nil
37 `((safe-chars . ,(let ((table (make-char-table 'safe-chars nil)))
38 (set-char-table-range table 'indian-is13194 t)
41 (aset table (decode-char 'ucs (+ #x900 i)) t))
43 (post-read-conversion . in-is13194-post-read-conversion)
44 (pre-write-conversion . in-is13194-pre-write-conversion)))
46 (define-coding-system-alias 'devanagari 'in-is13194)
48 (defvar indian-script-table
62 "Vector of Indian script names.")
64 (let ((len (length indian-script-table))
67 (put (aref indian-script-table i) 'indian-glyph-code-offset (* 256 i))
70 (defvar indian-default-script 'devanagari
71 "Default script for Indian languages.
72 Each Indian language environment sets this value
73 to one of `indian-script-table' (which see).
74 The default value is `devanagari'.")
76 (define-ccl-program ccl-encode-indian-glyph-font
78 ;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256))
79 (r1 = ((((r1 * 96) + r2) - ,(+ (* 32 96) 32)) % 256))))
81 (setq font-ccl-encoder-alist
82 (cons (cons "-CDAC" 'ccl-encode-indian-glyph-font)
83 font-ccl-encoder-alist))
87 ;;; indian.el ends here