66 |
(write (((r0 >> 6) & ?\x3F) | ?\x80)) |
(write (((r0 >> 6) & ?\x3F) | ?\x80)) |
67 |
(write ((r0 & ?\x3F) | ?\x80)))))))))) |
(write ((r0 & ?\x3F) | ?\x80)))))))))) |
68 |
|
|
69 |
|
(defun ucs-input-insert-char (char) |
70 |
|
(insert char) |
71 |
|
(move-overlay quail-overlay (overlay-start quail-overlay) (point))) |
72 |
|
|
73 |
(defun ucs-input-method (key) |
(defun ucs-input-method (key) |
74 |
(if (or buffer-read-only |
(if (or buffer-read-only |
75 |
(and (/= key ?U) (/= key ?u))) |
(and (/= key ?U) (/= key ?u))) |
76 |
(list key) |
(list key) |
77 |
(quail-setup-overlays nil) |
(quail-setup-overlays nil) |
78 |
(let ((current-prefix-arg) |
(ucs-input-insert-char key) |
|
(last-command-char key)) |
|
|
(call-interactively 'self-insert-command)) |
|
79 |
(let ((modified-p (buffer-modified-p)) |
(let ((modified-p (buffer-modified-p)) |
80 |
(buffer-undo-list t) |
(buffer-undo-list t) |
81 |
(input-method-function nil) |
(input-method-function nil) |
96 |
?b ?c ?d ?e ?f ?A ?B ?C ?D ?E ?F))) |
?b ?c ?d ?e ?f ?A ?B ?C ?D ?E ?F))) |
97 |
(progn |
(progn |
98 |
(push key events) |
(push key events) |
99 |
(let ((last-command-char key) |
(ucs-input-insert-char key)) |
|
(current-prefix-arg)) |
|
|
(call-interactively 'self-insert-command))) |
|
100 |
(let ((last-command-char key) |
(let ((last-command-char key) |
101 |
(current-prefix-arg)) |
(current-prefix-arg)) |
102 |
(condition-case nil |
(condition-case nil |
109 |
(cdr (nreverse events))) |
(cdr (nreverse events))) |
110 |
16)) |
16)) |
111 |
(c (decode-char 'ucs n)) |
(c (decode-char 'ucs n)) |
112 |
(status (make-vector 9 nil))) |
(status (make-vector 9 nil))) |
113 |
(if c |
(if c |
114 |
(list c) |
(list c) |
115 |
(aset status 0 n) |
(aset status 0 n) |
129 |
(< (prefix-numeric-value arg) 0)) |
(< (prefix-numeric-value arg) 0)) |
130 |
(unwind-protect |
(unwind-protect |
131 |
(progn |
(progn |
132 |
(quail-hide-guidance-buf) |
(quail-hide-guidance) |
133 |
(quail-delete-overlays) |
(quail-delete-overlays) |
134 |
(setq describe-current-input-method-function nil)) |
(setq describe-current-input-method-function nil)) |
135 |
(kill-local-variable 'input-method-function)) |
(kill-local-variable 'input-method-function)) |
155 |
|
|
156 |
Input as Unicode: U<hex> or u<hex>, where <hex> is a four-digit hex number."))) |
Input as Unicode: U<hex> or u<hex>, where <hex> is a four-digit hex number."))) |
157 |
|
|
158 |
(register-input-method "ucs" "UTF-8" 'ucs-input-activate "U+" |
;; The file ../leim-ext.el contains the following call. |
159 |
"Unicode input as hex in the form Uxxxx.") |
;; (register-input-method "ucs" "UTF-8" 'ucs-input-activate "U+" |
160 |
|
;; "Unicode input as hex in the form Uxxxx.") |
161 |
|
|
162 |
(provide 'uni-input) |
(provide 'uni-input) |
163 |
|
|