1 ;;; emu-mule.el --- emu module for Mule 1.* and Mule 2.*
3 ;; Copyright (C) 1995,1996,1997,1998 MORIOKA Tomohiko
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Katsumi Yamaoka <yamaoka@jpl.org>
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.
34 (defun regulate-latin-char (chr)
35 (cond ((and (<= ?
\e$B#A
\e(B chr)(<= chr ?
\e$B#Z
\e(B))
36 (+ (- chr ?
\e$B#A
\e(B) ?A))
37 ((and (<= ?
\e$B#a
\e(B chr)(<= chr ?
\e$B#z
\e(B))
38 (+ (- chr ?
\e$B#a
\e(B) ?a))
39 ((eq chr ?
\e$B!%
\e(B) ?.)
40 ((eq chr ?
\e$B!$
\e(B) ?,)
43 (defun regulate-latin-string (str)
44 (let ((len (length str))
48 (setq chr (sref str i))
49 (setq dest (concat dest
50 (char-to-string (regulate-latin-char chr))))
51 (setq i (+ i (char-bytes chr))))
60 ;;; emu-mule.el ends here