1 ;;; emu-nemacs.el --- emu API implementation for NEmacs
3 ;; Copyright (C) 1995,1996,1997,1998 MORIOKA Tomohiko
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Keywords: emulation, compatibility, NEmacs, mule
8 ;; This file is part of emu.
10 ;; This program is free software; you can redistribute it and/or
11 ;; modify it under the terms of the GNU General Public License as
12 ;; published by the Free Software Foundation; either version 2, or (at
13 ;; your option) any later version.
15 ;; This program is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; 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.
33 ;;; @@ for old MULE emulation
40 (defconst *internal* 3)
41 (defconst *euc-japan* 3)
43 (defun code-convert-string (str ic oc)
44 "Convert code in STRING from SOURCE code to TARGET code,
45 On successful converion, returns the result string,
46 else returns nil. [emu-nemacs.el; Mule emulating function]"
48 (convert-string-kanji-code str ic oc)
51 (defun code-convert-region (beg end ic oc)
52 "Convert code of the text between BEGIN and END from SOURCE
53 to TARGET. On successful conversion returns t,
54 else returns nil. [emu-nemacs.el; Mule emulating function]"
58 (narrow-to-region beg end)
59 (convert-region-kanji-code beg end ic oc)))
63 ;;; @ without code-conversion
66 (fset 'insert-binary-file-contents 'insert-file-contents-as-binary)
68 (defun insert-binary-file-contents-literally (filename
69 &optional visit beg end replace)
70 "Like `insert-file-contents-literally', q.v., but don't code conversion.
71 A buffer may be modified in several ways after reading into the buffer due
72 to advanced Emacs features, such as file-name-handlers, format decoding,
74 This function ensures that none of these modifications will take place.
77 ;; Returns list absolute file name and length of data inserted.
78 (insert-file-contents-literally filename visit beg end replace)))
86 ;;; emu-nemacs.el ends here