40 |
|
|
41 |
(require 'quail) |
(require 'quail) |
42 |
|
|
43 |
|
(defun ucs-input-insert-char (char) |
44 |
|
(insert char) |
45 |
|
(move-overlay quail-overlay (overlay-start quail-overlay) (point))) |
46 |
|
|
47 |
(defun ucs-input-method (key) |
(defun ucs-input-method (key) |
48 |
(if (or buffer-read-only |
(if (or buffer-read-only |
49 |
(and (/= key ?U) (/= key ?u))) |
(and (/= key ?U) (/= key ?u))) |
50 |
(list key) |
(list key) |
51 |
(quail-setup-overlays nil) |
(quail-setup-overlays nil) |
52 |
(let ((current-prefix-arg) |
(ucs-input-insert-char key) |
|
(last-command-char key)) |
|
|
(call-interactively 'self-insert-command)) |
|
53 |
(let ((modified-p (buffer-modified-p)) |
(let ((modified-p (buffer-modified-p)) |
54 |
(buffer-undo-list t) |
(buffer-undo-list t) |
55 |
(input-method-function nil) |
(input-method-function nil) |
70 |
?b ?c ?d ?e ?f ?A ?B ?C ?D ?E ?F))) |
?b ?c ?d ?e ?f ?A ?B ?C ?D ?E ?F))) |
71 |
(progn |
(progn |
72 |
(push key events) |
(push key events) |
73 |
(let ((last-command-char key) |
(ucs-input-insert-char key)) |
|
(current-prefix-arg)) |
|
|
(call-interactively 'self-insert-command))) |
|
74 |
(let ((last-command-char key) |
(let ((last-command-char key) |
75 |
(current-prefix-arg)) |
(current-prefix-arg)) |
76 |
(condition-case nil |
(condition-case nil |
98 |
(< (prefix-numeric-value arg) 0)) |
(< (prefix-numeric-value arg) 0)) |
99 |
(unwind-protect |
(unwind-protect |
100 |
(progn |
(progn |
101 |
(quail-hide-guidance-buf) |
(quail-hide-guidance) |
102 |
(quail-delete-overlays) |
(quail-delete-overlays) |
103 |
(setq describe-current-input-method-function nil)) |
(setq describe-current-input-method-function nil)) |
104 |
(kill-local-variable 'input-method-function)) |
(kill-local-variable 'input-method-function)) |
124 |
|
|
125 |
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."))) |
126 |
|
|
127 |
(register-input-method "ucs" "UTF-8" 'ucs-input-activate "U+" |
;; The file ../leim-ext.el contains the following call. |
128 |
"Unicode input as hex in the form Uxxxx.") |
;; (register-input-method "ucs" "UTF-8" 'ucs-input-activate "U+" |
129 |
|
;; "Unicode input as hex in the form Uxxxx.") |
130 |
|
|
131 |
(provide 'uni-input) |
(provide 'uni-input) |
132 |
|
|