From: morioka Date: Fri, 5 Jun 1998 12:48:02 +0000 (+0000) Subject: Move `split-char' check and repair code from mule-caesar.el. X-Git-Tag: apel-8_14~13 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa764e0e705d0041c46d5240f6d09b896fd0b0ff;p=elisp%2Fapel.git Move `split-char' check and repair code from mule-caesar.el. --- 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))