1 ;;; poem-xm.el --- poem implementation for XEmacs-mule
3 ;; Copyright (C) 1998 Free Software Foundation, Inc.
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Keywords: emulation, compatibility, Mule
8 ;; This file is part of APEL (A Portable Emacs Library).
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.
30 ;;; @ fix coding-system definition
33 ;; It seems not bug, but I can not permit it...
34 (and (coding-system-property 'iso-2022-jp 'input-charset-conversion)
35 (copy-coding-system 'iso-2022-7bit 'iso-2022-jp))
37 ;; Redefine if -{dos|mac|unix} is not found.
38 (or (find-coding-system 'raw-text-dos)
39 (copy-coding-system 'no-conversion-dos 'raw-text-dos))
40 (or (find-coding-system 'raw-text-mac)
41 (copy-coding-system 'no-conversion-mac 'raw-text-mac))
42 (or (find-coding-system 'raw-text-unix)
43 (copy-coding-system 'no-conversion-unix 'raw-text-unix))
45 (or (find-coding-system 'ctext-dos)
48 "Coding-system used in X as Compound Text Encoding."
49 '(charset-g0 ascii charset-g1 latin-iso8859-1
53 (or (find-coding-system 'iso-2022-jp-2-dos)
55 'iso-2022-jp-2 'iso2022
56 "ISO-2022 coding system using SS2 for 96-charset in 7-bit code."
58 charset-g2 t ;; unspecified but can be used later.
64 (or (find-coding-system 'euc-kr-dos)
67 "Coding-system of Korean EUC (Extended Unix Code)."
68 '(charset-g0 ascii charset-g1 korean-ksc5601
73 ;;; @ buffer representation
76 (defsubst-maybe set-buffer-multibyte (flag)
77 "Set the multibyte flag of the current buffer to FLAG.
78 If FLAG is t, this makes the buffer a multibyte buffer.
79 If FLAG is nil, this makes the buffer a single-byte buffer.
80 The buffer contents remain unchanged as a sequence of bytes
81 but the contents viewed as characters do change.
82 \[Emacs 20.3 emulating function]"
89 ;; avoid bug of XEmacs
90 (or (integerp (cdr (split-char ?a)))
91 (defun split-char (char)
92 "Return list of charset and one or two position-codes of CHAR."
93 (let ((charset (char-charset char)))
94 (if (eq charset 'ascii)
95 (list charset (char-int char))
97 (len (charset-dimension charset))
98 (code (if (integerp char)
103 (setq dest (cons (logand code 127) dest)
106 (cons charset dest)))))
109 (defmacro char-next-index (char index)
110 "Return index of character succeeding CHAR whose index is INDEX."
117 (defun string-to-int-list (str)
118 (mapcar #'char-int str))
120 (defalias 'looking-at-as-unibyte 'looking-at)
128 ;;; poem-xm.el ends here