diff options
| author | Kenichi Handa | 2004-09-21 02:25:16 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-09-21 02:25:16 +0000 |
| commit | ad7d24c4fbfe7f2ceb976db957528ac762145bc8 (patch) | |
| tree | 9c817993cfda0e61476b4fb35d5831fe9e1e3101 | |
| parent | c64fbf1f6090c8d413c84896e4c054feef268beb (diff) | |
| download | emacs-ad7d24c4fbfe7f2ceb976db957528ac762145bc8.tar.gz emacs-ad7d24c4fbfe7f2ceb976db957528ac762145bc8.zip | |
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.
| -rw-r--r-- | leim/quail/uni-input.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/leim/quail/uni-input.el b/leim/quail/uni-input.el index 319745aa6de..12b93dc19a6 100644 --- a/leim/quail/uni-input.el +++ b/leim/quail/uni-input.el | |||
| @@ -66,14 +66,16 @@ | |||
| 66 | (write (((r0 >> 6) & ?\x3F) | ?\x80)) | 66 | (write (((r0 >> 6) & ?\x3F) | ?\x80)) |
| 67 | (write ((r0 & ?\x3F) | ?\x80)))))))))) | 67 | (write ((r0 & ?\x3F) | ?\x80)))))))))) |
| 68 | 68 | ||
| 69 | (defun ucs-input-insert-char (char) | ||
| 70 | (insert char) | ||
| 71 | (move-overlay quail-overlay (overlay-start quail-overlay) (point))) | ||
| 72 | |||
| 69 | (defun ucs-input-method (key) | 73 | (defun ucs-input-method (key) |
| 70 | (if (or buffer-read-only | 74 | (if (or buffer-read-only |
| 71 | (and (/= key ?U) (/= key ?u))) | 75 | (and (/= key ?U) (/= key ?u))) |
| 72 | (list key) | 76 | (list key) |
| 73 | (quail-setup-overlays nil) | 77 | (quail-setup-overlays nil) |
| 74 | (let ((current-prefix-arg) | 78 | (ucs-input-insert-char key) |
| 75 | (last-command-char key)) | ||
| 76 | (call-interactively 'self-insert-command)) | ||
| 77 | (let ((modified-p (buffer-modified-p)) | 79 | (let ((modified-p (buffer-modified-p)) |
| 78 | (buffer-undo-list t) | 80 | (buffer-undo-list t) |
| 79 | (input-method-function nil) | 81 | (input-method-function nil) |
| @@ -94,9 +96,7 @@ | |||
| 94 | ?b ?c ?d ?e ?f ?A ?B ?C ?D ?E ?F))) | 96 | ?b ?c ?d ?e ?f ?A ?B ?C ?D ?E ?F))) |
| 95 | (progn | 97 | (progn |
| 96 | (push key events) | 98 | (push key events) |
| 97 | (let ((last-command-char key) | 99 | (ucs-input-insert-char key)) |
| 98 | (current-prefix-arg)) | ||
| 99 | (call-interactively 'self-insert-command))) | ||
| 100 | (let ((last-command-char key) | 100 | (let ((last-command-char key) |
| 101 | (current-prefix-arg)) | 101 | (current-prefix-arg)) |
| 102 | (condition-case nil | 102 | (condition-case nil |
| @@ -109,7 +109,7 @@ | |||
| 109 | (cdr (nreverse events))) | 109 | (cdr (nreverse events))) |
| 110 | 16)) | 110 | 16)) |
| 111 | (c (decode-char 'ucs n)) | 111 | (c (decode-char 'ucs n)) |
| 112 | (status (make-vector 9 nil))) | 112 | (status (make-vector 9 nil))) |
| 113 | (if c | 113 | (if c |
| 114 | (list c) | 114 | (list c) |
| 115 | (aset status 0 n) | 115 | (aset status 0 n) |
| @@ -129,7 +129,7 @@ While this input method is active, the variable | |||
| 129 | (< (prefix-numeric-value arg) 0)) | 129 | (< (prefix-numeric-value arg) 0)) |
| 130 | (unwind-protect | 130 | (unwind-protect |
| 131 | (progn | 131 | (progn |
| 132 | (quail-hide-guidance-buf) | 132 | (quail-hide-guidance) |
| 133 | (quail-delete-overlays) | 133 | (quail-delete-overlays) |
| 134 | (setq describe-current-input-method-function nil)) | 134 | (setq describe-current-input-method-function nil)) |
| 135 | (kill-local-variable 'input-method-function)) | 135 | (kill-local-variable 'input-method-function)) |
| @@ -155,8 +155,9 @@ Input method: ucs (mode line indicator:U) | |||
| 155 | 155 | ||
| 156 | Input as Unicode: U<hex> or u<hex>, where <hex> is a four-digit hex number."))) | 156 | Input as Unicode: U<hex> or u<hex>, where <hex> is a four-digit hex number."))) |
| 157 | 157 | ||
| 158 | (register-input-method "ucs" "UTF-8" 'ucs-input-activate "U+" | 158 | ;; The file ../leim-ext.el contains the following call. |
| 159 | "Unicode input as hex in the form Uxxxx.") | 159 | ;; (register-input-method "ucs" "UTF-8" 'ucs-input-activate "U+" |
| 160 | ;; "Unicode input as hex in the form Uxxxx.") | ||
| 160 | 161 | ||
| 161 | (provide 'uni-input) | 162 | (provide 'uni-input) |
| 162 | 163 | ||