From aa764e0e705d0041c46d5240f6d09b896fd0b0ff Mon Sep 17 00:00:00 2001 From: morioka Date: Fri, 5 Jun 1998 12:48:02 +0000 Subject: [PATCH] Move `split-char' check and repair code from mule-caesar.el. --- emu-x20.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/emu-x20.el b/emu-x20.el index 2afa72e..e4aef1e 100644 --- a/emu-x20.el +++ b/emu-x20.el @@ -229,6 +229,27 @@ but the contents viewed as characters do change. ;;; @ character ;;; +;; avoid bug of XEmacs +(or (integerp (cdr (split-char ?a))) + (defun split-char (char) + "Return list of charset and one or two position-codes of CHAR." + (let ((charset (char-charset char))) + (if (eq charset 'ascii) + (list charset (char-int char)) + (let ((i 0) + (len (charset-dimension charset)) + (code (if (integerp char) + char + (char-int char))) + dest) + (while (< i len) + (setq dest (cons (logand code 127) dest) + code (lsh code -7) + i (1+ i))) + (cons charset dest) + )))) + ) + (defmacro char-next-index (char index) "Return index of character succeeding CHAR whose index is INDEX." `(1+ ,index)) -- 1.7.10.4