# HG changeset patch # User Kenichi Handa # Date 910755375 0 # Node ID 9913df387dfbee75752d40ceb10e8159f94d0788 # Parent 29fd5e07b576606e65702c0cb73eab6e78ecb640 (compose-chars-component): Signal error if CH is a rule-based composition character. (compose-chars): Signal error if an already compsed character is going to be composed by rule-base. diff -r 29fd5e07b576 -r 9913df387dfb lisp/international/mule-util.el --- a/lisp/international/mule-util.el Wed Nov 11 03:36:15 1998 +0000 +++ b/lisp/international/mule-util.el Wed Nov 11 03:36:15 1998 +0000 @@ -470,7 +470,9 @@ (format "\240%c" (+ ch 128)) (let ((str (string-as-unibyte (char-to-string ch)))) (if (cmpcharp ch) - (substring str (if (= (aref str 1) ?\xFF) 2 1)) + (if (= (aref str 1) ?\xFF) + (error "Can't compose a rule-based composition character") + (substring str (if (= (aref str 1) ?\xFF) 2 1))) (aset str 0 (+ (aref str 0) ?\x20)) str)))) @@ -493,12 +495,17 @@ (let* ((with-rule (consp (car args))) (str (if with-rule (concat (vector leading-code-composition ?\xFF)) (char-to-string leading-code-composition)))) + (if (and with-rule + (cmpcharp first-component)) + (error "Can't compose an already composed character")) (setq str (concat str (compose-chars-component first-component))) (while args (if with-rule (progn (if (not (consp (car args))) (error "Invalid composition rule: %s" (car args))) + (if (cmpcharp (car (cdr args))) + (error "Can't compose an already composed character")) (setq str (concat str (compose-chars-rule (car args)) (compose-chars-component (car (cdr args)))) args (cdr (cdr args))))