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
72 ;; (when (= (function-max-args 'coding-system-list) 0)
73 ;; (or (fboundp 'coding-system-list-internal)
74 ;; (fset 'coding-system-list-internal
75 ;; (symbol-function 'coding-system-list)))
76 ;; (defun coding-system-list (&optional base-only)
77 ;; "Return a list of all existing coding systems.
78 ;; If optional arg BASE-ONLY is non-nil, only base coding systems are listed."
81 ;; (rest (coding-system-list-internal))
84 ;; (setq cs (coding-system-name (coding-system-base (pop rest))))
89 ;; (coding-system-list-internal)))
93 ;;; @ buffer representation
96 (defsubst-maybe set-buffer-multibyte (flag)
97 "Set the multibyte flag of the current buffer to FLAG.
98 If FLAG is t, this makes the buffer a multibyte buffer.
99 If FLAG is nil, this makes the buffer a single-byte buffer.
100 The buffer contents remain unchanged as a sequence of bytes
101 but the contents viewed as characters do change.
102 \[Emacs 20.3 emulating function]"
109 ;; avoid bug of XEmacs
110 (or (integerp (cdr (split-char ?a)))
111 (defun split-char (char)
112 "Return list of charset and one or two position-codes of CHAR."
113 (let ((charset (char-charset char)))
114 (if (eq charset 'ascii)
115 (list charset (char-int char))
117 (len (charset-dimension charset))
118 (code (if (integerp char)
123 (setq dest (cons (logand code 127) dest)
126 (cons charset dest)))))
129 (defmacro char-next-index (char index)
130 "Return index of character succeeding CHAR whose index is INDEX."
137 (defun string-to-int-list (str)
138 (mapcar #'char-int str))
140 (defalias 'looking-at-as-unibyte 'looking-at)
148 ;;; poem-xm.el ends here