changeset 57180:5afba9a35578

Move the call of register-input-method to leim-ext.el. (ucs-input-insert-char): New function. (ucs-input-method): Use ucs-input-insert-char. (ucs-input-activate): Call quail-hide-guidance instead of quail-hide-guidance-buf.
author Kenichi Handa <handa@m17n.org>
date Tue, 21 Sep 2004 02:25:16 +0000
parents 9f1b3f7445fb
children 8818a855274d
files leim/quail/uni-input.el
diffstat 1 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/leim/quail/uni-input.el	Tue Sep 21 02:23:32 2004 +0000
+++ b/leim/quail/uni-input.el	Tue Sep 21 02:25:16 2004 +0000
@@ -66,14 +66,16 @@
 	       (write (((r0 >> 6) & ?\x3F) | ?\x80))
 	       (write ((r0 & ?\x3F) | ?\x80))))))))))
 
+(defun ucs-input-insert-char (char)
+  (insert char)
+  (move-overlay quail-overlay (overlay-start quail-overlay) (point)))
+
 (defun ucs-input-method (key)
   (if (or buffer-read-only
 	  (and (/= key ?U) (/= key ?u)))
       (list key)
     (quail-setup-overlays nil)
-    (let ((current-prefix-arg)
-	  (last-command-char key))
-      (call-interactively 'self-insert-command))
+    (ucs-input-insert-char key)
     (let ((modified-p (buffer-modified-p))
 	  (buffer-undo-list t)
 	  (input-method-function nil)
@@ -94,9 +96,7 @@
 				       ?b ?c ?d ?e ?f ?A ?B ?C ?D ?E ?F)))
 		      (progn
 			(push key events)
-			(let ((last-command-char key)
-			      (current-prefix-arg))
-			  (call-interactively 'self-insert-command)))
+			(ucs-input-insert-char key))
 		    (let ((last-command-char key)
 			  (current-prefix-arg))
 		      (condition-case nil
@@ -109,7 +109,7 @@
 						 (cdr (nreverse events)))
 					  16))
 		     (c (decode-char 'ucs n))
-		    (status (make-vector 9 nil)))
+		     (status (make-vector 9 nil)))
 		(if c
 		    (list c)
 		  (aset status 0 n)
@@ -129,7 +129,7 @@
 	  (< (prefix-numeric-value arg) 0))
       (unwind-protect
 	  (progn
-	    (quail-hide-guidance-buf)
+	    (quail-hide-guidance)
 	    (quail-delete-overlays)
 	    (setq describe-current-input-method-function nil))
 	(kill-local-variable 'input-method-function))
@@ -155,8 +155,9 @@
 
 Input as Unicode: U<hex> or u<hex>, where <hex> is a four-digit hex number.")))
 
-(register-input-method "ucs" "UTF-8" 'ucs-input-activate "U+"
-		       "Unicode input as hex in the form Uxxxx.")
+;; The file ../leim-ext.el contains the following call.
+;; (register-input-method "ucs" "UTF-8" 'ucs-input-activate "U+"
+;; 		       "Unicode input as hex in the form Uxxxx.")
 
 (provide 'uni-input)