(split-char): Redefine if it has bug.
[elisp/apel.git] / emu-e20.el
index 6f51347..c3c42d3 100644 (file)
@@ -28,7 +28,7 @@
 
 ;;; Code:
 
-(require 'emu-19)
+(require 'emu-e19)
 
 (defun fontset-pixel-size (fontset)
   (let* ((info (fontset-info fontset))
          (t 0)
          )))
 
+(if (and (fboundp 'set-buffer-multibyte)
+        (subrp (symbol-function 'set-buffer-multibyte)))
+    (require 'emu-e20_3) ; for Emacs 20.3
+  (require 'emu-e20_2) ; for Emacs 20.1 and 20.2
+  )
+
 
 ;;; @ character set
 ;;;
@@ -87,7 +93,7 @@ code conversion will not take place."
        (coding-system-for-read 'binary)
        format-alist)
     (insert-file-contents filename visit beg end replace)
-    (setq enable-multibyte-characters flag)
+    (set-buffer-multibyte flag)
     ))
 
 (defalias 'insert-binary-file-contents 'insert-file-contents-as-binary)
@@ -147,6 +153,8 @@ code conversion will not take place."
     ((ascii latin-iso8859-9)                           . iso-8859-9)
     ((ascii latin-jisx0201
            japanese-jisx0208-1978 japanese-jisx0208)   . iso-2022-jp)
+    ((ascii latin-jisx0201
+           katakana-jisx0201 japanese-jisx0208)        . shift_jis)
     ((ascii korean-ksc5601)                            . euc-kr)
     ((ascii chinese-gb2312)                            . cn-gb-2312)
     ((ascii chinese-big5-1 chinese-big5-2)             . cn-big5)
@@ -174,10 +182,6 @@ code conversion will not take place."
 ;;; @ character
 ;;;
 
-(defmacro char-next-index (char index)
-  "Return index of character succeeding CHAR whose index is INDEX."
-  `(+ index (char-bytes char)))
-
 ;;; @@ Mule emulating aliases
 ;;;
 ;;; You should not use them.
@@ -189,36 +193,6 @@ TABLE defaults to the current buffer's category table."
   (category-set-mnemonics (char-category-set character))
   )
 
-;;; @@ obsoleted aliases
-;;;
-;;; You should not use them.
-
-(defalias 'char-length 'char-bytes)
-(defalias 'char-columns 'char-width)
-
-
-;;; @ string
-;;;
-
-(defalias 'string-columns 'string-width)
-
-(defalias 'sset 'store-substring)
-
-(defun string-to-char-list (string)
-  "Return a list of which elements are characters in the STRING."
-  (let* ((len (length string))
-        (i 0)
-        l chr)
-    (while (< i len)
-      (setq chr (sref string i))
-      (setq l (cons chr l))
-      (setq i (+ i (char-bytes chr)))
-      )
-    (nreverse l)
-    ))
-
-(defalias 'string-to-int-list 'string-to-char-list)
-
 
 ;;; @ end
 ;;;