2 ;;; emu-e19.el --- Mule 2 emulation module for Emacs 19 and XEmacs 19
4 ;;; Copyright (C) 1995 Free Software Foundation, Inc.
5 ;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko
7 ;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
9 ;;; $Id: emu-e19.el,v 7.10 1996/04/27 13:48:55 morioka Exp $
10 ;;; Keywords: emulation, compatibility, Mule
12 ;;; This file is part of tl (Tiny Library).
14 ;;; This program is free software; you can redistribute it and/or
15 ;;; modify it under the terms of the GNU General Public License as
16 ;;; published by the Free Software Foundation; either version 2, or
17 ;;; (at your option) any later version.
19 ;;; This program is distributed in the hope that it will be useful,
20 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 ;;; General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with This program. If not, write to the Free Software
26 ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
34 (defconst lc-ltn1 129)
36 (defun char-charset (chr)
37 "Return the character set of char CHR.
38 \[emu-e19.el; XEmacs 20 emulating function]"
43 (defalias 'char-leading-char 'char-charset)
45 (defun find-charset-string (str)
46 "Return a list of leading-chars in the string.
47 \[emu-e19.el; Mule emulating function]"
48 (if (string-match "[\200-\377]" str)
52 (defun find-charset-region (start end)
53 "Return a list of leading-chars in the region between START and END.
54 \[emu-e19.el; Mule emulating function]"
57 (narrow-to-region start end)
59 (re-search-forward "[\200-\377]" nil t)
68 (defconst *internal* nil)
69 (defconst *ctext* nil)
70 (defconst *noconv* nil)
72 (defun code-convert-string (str ic oc)
73 "Convert code in STRING from SOURCE code to TARGET code,
74 On successful converion, returns the result string,
75 else returns nil. [emu-e19.el; Mule emulating function]"
78 (defun decode-coding-string (str coding-system)
79 "Decode the string STR which is encoded in CODING-SYSTEM.
80 \[emu-mule.el; XEmacs 20 emulating function]"
83 (defun encode-coding-string (str coding-system)
84 "Encode the string STR which is encoded in CODING-SYSTEM.
85 \[emu-mule.el; XEmacs 20 emulating function]"
88 (defun code-convert-region (beg end ic oc)
89 "Convert code of the text between BEGIN and END from SOURCE
90 to TARGET. On successful conversion returns t,
91 else returns nil. [emu-e19.el; Mule emulating function]"
94 (defun decode-coding-region (start end coding-system &optional buffer)
95 "Decode the text between START and END which is encoded in CODING-SYSTEM.
96 \[emu-mule.el; XEmacs 20 emulating function]"
99 (defun encode-coding-region (start end coding-system &optional buffer)
100 "Encode the text between START and END which is encoded in CODING-SYSTEM.
101 \[emu-mule.el; XEmacs 20 emulating function]"
104 (defun code-detect-region (beg end)
105 "Detect coding-system of the text in the region between START and END.
106 \[emu-e19.el; Mule emulating function]"
109 (defun set-file-coding-system (coding-system &optional force)
113 ;;; @ character and string
116 (defun char-bytes (chr) 1)
117 (defun char-width (chr) 1)
119 (defalias 'string-width 'length)
121 (defun string-to-char-list (str)
122 (mapcar (function identity) str)
125 (defalias 'sref 'aref)
127 (defun truncate-string (str width &optional start-column)
128 "Truncate STR to fit in WIDTH columns.
129 Optional non-nil arg START-COLUMN specifies the starting column.
130 \[emu-e19.el; Mule 2.3 emulating function]"
132 (setq start-column 0))
133 (substring str start-column width)
140 (cond (running-xemacs
141 (require 'emu-xemacs))
152 ;;; emu-e19.el ends here