1 ;;; emu-e20.el --- emu API implementation for Emacs/mule (19.34.91-delta)
3 ;; Copyright (C) 1996,1997 Free Software Foundation, Inc.
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Version: $Id: emu-e20.el,v 7.24 1997/09/07 02:39:24 morioka Exp $
7 ;; Keywords: emulation, compatibility, Mule
9 ;; This file is part of emu.
11 ;; This program is free software; you can redistribute it and/or
12 ;; modify it under the terms of the GNU General Public License as
13 ;; published by the Free Software Foundation; either version 2, or (at
14 ;; your option) any later version.
16 ;; This program is distributed in the hope that it will be useful, but
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
28 ;; This module requires Emacs 20.0.90 or later.
34 (defun fontset-pixel-size (fontset)
35 (let* ((info (fontset-info fontset))
36 (height (aref info 1))
38 (cond ((> height 0) height)
39 ((string-match "-\\([0-9]+\\)-" fontset)
41 (substring fontset (match-beginning 1)(match-end 1))
51 ;; (defalias 'charset-columns 'charset-width)
53 (defun find-non-ascii-charset-string (string)
54 "Return a list of charsets in the STRING except ascii."
55 (delq 'ascii (find-charset-string string))
58 (defun find-non-ascii-charset-region (start end)
59 "Return a list of charsets except ascii
60 in the region between START and END."
61 (delq 'ascii (find-charset-string (buffer-substring start end)))
68 (defsubst-maybe find-coding-system (obj)
69 "Return OBJ if it is a coding-system."
70 (if (coding-system-p obj)
73 (defalias 'set-process-input-coding-system 'set-process-coding-system)
79 (defvar charsets-mime-charset-alist
80 '(((ascii) . us-ascii)
81 ((ascii latin-iso8859-1) . iso-8859-1)
82 ((ascii latin-iso8859-2) . iso-8859-2)
83 ((ascii latin-iso8859-3) . iso-8859-3)
84 ((ascii latin-iso8859-4) . iso-8859-4)
85 ;;; ((ascii cyrillic-iso8859-5) . iso-8859-5)
86 ((ascii cyrillic-iso8859-5) . koi8-r)
87 ((ascii arabic-iso8859-6) . iso-8859-6)
88 ((ascii greek-iso8859-7) . iso-8859-7)
89 ((ascii hebrew-iso8859-8) . iso-8859-8)
90 ((ascii latin-iso8859-9) . iso-8859-9)
91 ((ascii latin-jisx0201
92 japanese-jisx0208-1978 japanese-jisx0208) . iso-2022-jp)
93 ((ascii korean-ksc5601) . euc-kr)
94 ((ascii chinese-gb2312) . cn-gb-2312)
95 ((ascii chinese-big5-1 chinese-big5-2) . cn-big5)
96 ((ascii latin-iso8859-1 greek-iso8859-7
97 latin-jisx0201 japanese-jisx0208-1978
98 chinese-gb2312 japanese-jisx0208
99 korean-ksc5601 japanese-jisx0212) . iso-2022-jp-2)
100 ((ascii latin-iso8859-1 greek-iso8859-7
101 latin-jisx0201 japanese-jisx0208-1978
102 chinese-gb2312 japanese-jisx0208
103 korean-ksc5601 japanese-jisx0212
104 chinese-cns11643-1 chinese-cns11643-2) . iso-2022-int-1)
105 ((ascii latin-iso8859-1 latin-iso8859-2
106 cyrillic-iso8859-5 greek-iso8859-7
107 latin-jisx0201 japanese-jisx0208-1978
108 chinese-gb2312 japanese-jisx0208
109 korean-ksc5601 japanese-jisx0212
110 chinese-cns11643-1 chinese-cns11643-2
111 chinese-cns11643-3 chinese-cns11643-4
112 chinese-cns11643-5 chinese-cns11643-6
113 chinese-cns11643-7) . iso-2022-int-1)
120 (defalias 'char-length 'char-bytes)
122 (defalias 'char-columns 'char-width)
125 ;;; @@ Mule emulating aliases
127 ;;; You should not use them.
129 (defun char-category (character)
130 "Return string of category mnemonics for CHAR in TABLE.
131 CHAR can be any multilingual character
132 TABLE defaults to the current buffer's category table."
133 (category-set-mnemonics (char-category-set character))
140 (defalias 'string-columns 'string-width)
142 (defalias 'sset 'store-substring)
144 (defun string-to-char-list (string)
145 "Return a list of which elements are characters in the STRING."
146 (let* ((len (length string))
150 (setq chr (sref string i))
151 (setq l (cons chr l))
152 (setq i (+ i (char-bytes chr)))
157 (defalias 'string-to-int-list 'string-to-char-list)
167 ;;; emu-e20.el ends here