diff options
| author | Kenichi Handa | 2008-06-07 12:43:11 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-06-07 12:43:11 +0000 |
| commit | 3436ab424b7bd399706d563ec5107b34f67486bc (patch) | |
| tree | 5b264524dec55868b88c6ed2f2a9cf0c6f111b96 | |
| parent | be99ca23c286e2e264856cbb51a1166c17a5f4dd (diff) | |
| download | emacs-3436ab424b7bd399706d563ec5107b34f67486bc.tar.gz emacs-3436ab424b7bd399706d563ec5107b34f67486bc.zip | |
Docstrings improved.
| -rw-r--r-- | leim/quail/hangul.el | 265 | ||||
| -rw-r--r-- | lisp/ChangeLog | 6 |
2 files changed, 142 insertions, 129 deletions
diff --git a/leim/quail/hangul.el b/leim/quail/hangul.el index b9aba3dad49..d46746e64f8 100644 --- a/leim/quail/hangul.el +++ b/leim/quail/hangul.el | |||
| @@ -31,13 +31,13 @@ | |||
| 31 | (require 'cl) | 31 | (require 'cl) |
| 32 | (require 'hanja-util) | 32 | (require 'hanja-util) |
| 33 | 33 | ||
| 34 | ;; Hangul double jamo table. | 34 | ;; Hangul double Jamo table. |
| 35 | ;; The format is an alist of JAMO-TYPE vs. DOUBLE-JAMO-TABLE. | 35 | ;; The format is an alist of JAMO-TYPE vs. DOUBLE-JAMO-TABLE. |
| 36 | ;; | 36 | ;; |
| 37 | ;; JAMO-TYPE is a symbol `cho' for Choseong, `jung' for Jungseong, and | 37 | ;; JAMO-TYPE is a symbol `cho' for Choseong, `jung' for Jungseong, and |
| 38 | ;; `jong' for Jongseong. | 38 | ;; `jong' for Jongseong. |
| 39 | ;; | 39 | ;; |
| 40 | ;; DOUBLE-JAMO-TABLE is an alist of jamo index vs. the vector of jamo | 40 | ;; DOUBLE-JAMO-TABLE is an alist of Jamo index vs. the vector of Jamo |
| 41 | ;; indies that can be combined with the car part. | 41 | ;; indies that can be combined with the car part. |
| 42 | ;; | 42 | ;; |
| 43 | ;; Jamo index is a relative index in `hangul Compatibility Jamo' area | 43 | ;; Jamo index is a relative index in `hangul Compatibility Jamo' area |
| @@ -60,7 +60,7 @@ | |||
| 60 | 60 | ||
| 61 | ;; Hangul 2-Bulsik keymap. | 61 | ;; Hangul 2-Bulsik keymap. |
| 62 | ;; It converts an ASCII code A-Z, a-z, to the corresponding hangul | 62 | ;; It converts an ASCII code A-Z, a-z, to the corresponding hangul |
| 63 | ;; jamo index. | 63 | ;; Jamo index. |
| 64 | 64 | ||
| 65 | (defconst hangul2-keymap | 65 | (defconst hangul2-keymap |
| 66 | [17 48 26 23 7 9 30 39 33 35 31 51 49 44 32 36 18 1 4 21 37 29 24 28 43 27]) | 66 | [17 48 26 23 7 9 30 39 33 35 31 51 49 44 32 36 18 1 4 21 37 29 24 28 43 27]) |
| @@ -93,9 +93,10 @@ | |||
| 93 | "Keymap for Hangul method. It is used by all Hangul input method.") | 93 | "Keymap for Hangul method. It is used by all Hangul input method.") |
| 94 | 94 | ||
| 95 | ;; Current input character buffer. Store separated hangul character. | 95 | ;; Current input character buffer. Store separated hangul character. |
| 96 | ;; First and second index of vector stored "Choseong". | 96 | ;; The first and second are Choseong position. |
| 97 | ;; Third and forth index of vector stored "Jungseong". | 97 | ;; The third and forth are Jungseong position. |
| 98 | ;; Fifth and sixth index of vector stored "Jongseong". | 98 | ;; The fifth and sixth are Jongseong position. |
| 99 | ;; The second, forth and sixth are double Jamo position. | ||
| 99 | (defvar hangul-queue | 100 | (defvar hangul-queue |
| 100 | (make-vector 6 0)) | 101 | (make-vector 6 0)) |
| 101 | 102 | ||
| @@ -128,10 +129,10 @@ Return a zero-length string if the conversion fails." | |||
| 128 | ((< jong 19) 1) | 129 | ((< jong 19) 1) |
| 129 | ((< jong 25) 2) | 130 | ((< jong 25) 2) |
| 130 | (t 3)))) | 131 | (t 3)))) |
| 131 | (+ #x3130 | 132 | (+ #x3130 |
| 132 | (cond ((/= cho 0) cho) | 133 | (cond ((/= cho 0) cho) |
| 133 | ((/= jung 0) jung) | 134 | ((/= jung 0) jung) |
| 134 | ((/= jong 0) jong))))) | 135 | ((/= jong 0) jong))))) |
| 135 | "")) | 136 | "")) |
| 136 | 137 | ||
| 137 | (defun hangul-insert-character (&rest queues) | 138 | (defun hangul-insert-character (&rest queues) |
| @@ -159,9 +160,9 @@ Setup `quail-overlay' to the last character." | |||
| 159 | (move-overlay quail-overlay (1+ (overlay-start quail-overlay)) (point)))) | 160 | (move-overlay quail-overlay (1+ (overlay-start quail-overlay)) (point)))) |
| 160 | 161 | ||
| 161 | (defun hangul-djamo (jamo char1 char2) | 162 | (defun hangul-djamo (jamo char1 char2) |
| 162 | "Return the dobule jamo index calculated from the arguments. | 163 | "Return the dobule Jamo index calculated from the arguments. |
| 163 | JAMO is a type of Hangul jamo; `cho', `jung', or `jong'. | 164 | JAMO is a type of Hangul Jamo; `cho', `jung', or `jong'. |
| 164 | CHAR1 and CAHR2 are Hangul jamo indices. | 165 | CHAR1 and CAHR2 are Hangul Jamo indices. |
| 165 | Return nil if CHAR1 and CHAR2 can not combined." | 166 | Return nil if CHAR1 and CHAR2 can not combined." |
| 166 | (let* ((jamo (cdr (assoc jamo hangul-djamo-table))) | 167 | (let* ((jamo (cdr (assoc jamo hangul-djamo-table))) |
| 167 | (char1 (cdr (assoc char1 jamo)))) | 168 | (char1 (cdr (assoc char1 jamo)))) |
| @@ -173,15 +174,17 @@ Return nil if CHAR1 and CHAR2 can not combined." | |||
| 173 | (throw 'found i)) | 174 | (throw 'found i)) |
| 174 | (setf i (1- i)))) | 175 | (setf i (1- i)))) |
| 175 | 0)) | 176 | 0)) |
| 176 | 0))) | 177 | 0))) |
| 177 | 178 | ||
| 178 | (defsubst hangul2-input-method-jaum (char) | 179 | (defsubst hangul2-input-method-jaum (char) |
| 179 | "Store hangul jamo indice CHAR in `hangul-queue'. | 180 | "Store Hangul Jamo indice CHAR in `hangul-queue'. |
| 180 | Maybe, it is a Hangul 2-Bulsik jaum. | 181 | It is a Hangul 2-Bulsik Jaum. |
| 181 | This function processes a Hangul 2-Bulsik jaum. | 182 | This function processes a Hangul 2-Bulsik Jaum. |
| 182 | Unless the function inserts CHAR to current input queue, | 183 | The Hangul 2-Bulsik is composed of a Jaum and a Moum. |
| 183 | commit current character and then start next character. | 184 | The Jaum can be located in a Choseong position and a Jongseong position. |
| 184 | The Hangul 2-Bulsik is composed of `jaum' and `moum'." | 185 | Unless the function inserts CHAR to `hangul-queue', |
| 186 | commit current `hangul-queue' and then set a new `hangul-queue', | ||
| 187 | and insert CHAR to new `hangul-queue'." | ||
| 185 | (if (cond ((zerop (aref hangul-queue 0)) | 188 | (if (cond ((zerop (aref hangul-queue 0)) |
| 186 | (aset hangul-queue 0 char)) | 189 | (aset hangul-queue 0 char)) |
| 187 | ((and (zerop (aref hangul-queue 1)) | 190 | ((and (zerop (aref hangul-queue 1)) |
| @@ -228,13 +231,14 @@ The Hangul 2-Bulsik is composed of `jaum' and `moum'." | |||
| 228 | char))))) | 231 | char))))) |
| 229 | (aset hangul-queue 5 char))) | 232 | (aset hangul-queue 5 char))) |
| 230 | (hangul-insert-character hangul-queue) | 233 | (hangul-insert-character hangul-queue) |
| 231 | (hangul-insert-character hangul-queue | 234 | (hangul-insert-character hangul-queue |
| 232 | (setq hangul-queue (vector char 0 0 0 0 0))))) | 235 | (setq hangul-queue (vector char 0 0 0 0 0))))) |
| 233 | 236 | ||
| 234 | (defsubst hangul2-input-method-moum (char) | 237 | (defsubst hangul2-input-method-moum (char) |
| 235 | "Store hangul jamo indice CHAR in `hangul-queue'. | 238 | "Store Hangul Jamo indice CHAR in `hangul-queue'. |
| 236 | Maybe, it is a Hangul 2-Bulsik moum. | 239 | It is a Hangul 2-Bulsik Moum. |
| 237 | This function process a Hangul 2-Bulsik moum. | 240 | This function process a Hangul 2-Bulsik Moum. |
| 241 | The Moum can be located in a Jungseong position. | ||
| 238 | Other parts are the same as a `hangul2-input-method-jaum'." | 242 | Other parts are the same as a `hangul2-input-method-jaum'." |
| 239 | (if (cond ((zerop (aref hangul-queue 2)) | 243 | (if (cond ((zerop (aref hangul-queue 2)) |
| 240 | (aset hangul-queue 2 char)) | 244 | (aset hangul-queue 2 char)) |
| @@ -243,21 +247,22 @@ Other parts are the same as a `hangul2-input-method-jaum'." | |||
| 243 | (notzerop (hangul-djamo 'jung (aref hangul-queue 2) char))) | 247 | (notzerop (hangul-djamo 'jung (aref hangul-queue 2) char))) |
| 244 | (aset hangul-queue 3 char))) | 248 | (aset hangul-queue 3 char))) |
| 245 | (hangul-insert-character hangul-queue) | 249 | (hangul-insert-character hangul-queue) |
| 246 | (let ((next-char (vector 0 0 char 0 0 0))) | 250 | (let ((next-char (vector 0 0 char 0 0 0))) |
| 247 | (cond ((notzerop (aref hangul-queue 5)) | 251 | (cond ((notzerop (aref hangul-queue 5)) |
| 248 | (aset next-char 0 (aref hangul-queue 5)) | 252 | (aset next-char 0 (aref hangul-queue 5)) |
| 249 | (aset hangul-queue 5 0)) | 253 | (aset hangul-queue 5 0)) |
| 250 | ((notzerop (aref hangul-queue 4)) | 254 | ((notzerop (aref hangul-queue 4)) |
| 251 | (aset next-char 0 (aref hangul-queue 4)) | 255 | (aset next-char 0 (aref hangul-queue 4)) |
| 252 | (aset hangul-queue 4 0))) | 256 | (aset hangul-queue 4 0))) |
| 253 | (hangul-insert-character hangul-queue | 257 | (hangul-insert-character hangul-queue |
| 254 | (setq hangul-queue next-char))))) | 258 | (setq hangul-queue next-char))))) |
| 255 | 259 | ||
| 256 | (defsubst hangul3-input-method-cho (char) | 260 | (defsubst hangul3-input-method-cho (char) |
| 257 | "Store hangul jamo indice CHAR in `hangul-queue'. | 261 | "Store Hangul Jamo indice CHAR in `hangul-queue'. |
| 258 | Maybe, it is a Hangul 3-Bulsik choseong. | 262 | It is a Hangul 3-Bulsik Choseong. |
| 259 | This function process a Hangul 3-Bulsik choseong. | 263 | This function process a Hangul 3-Bulsik Choseong. |
| 260 | The Hangul 3-Bulsik is composed of `choseong', `jungseong' and `jongseong'. | 264 | The Hangul 3-Bulsik is composed of a Choseong, a Jungseong and a Jongseong. |
| 265 | The Choseong can be located in a Choseong position. | ||
| 261 | Other parts are the same as a `hangul2-input-method-jaum'." | 266 | Other parts are the same as a `hangul2-input-method-jaum'." |
| 262 | (if (cond ((and (zerop (aref hangul-queue 0)) | 267 | (if (cond ((and (zerop (aref hangul-queue 0)) |
| 263 | (zerop (aref hangul-queue 4))) | 268 | (zerop (aref hangul-queue 4))) |
| @@ -267,13 +272,14 @@ Other parts are the same as a `hangul2-input-method-jaum'." | |||
| 267 | (notzerop (hangul-djamo 'cho (aref hangul-queue 0) char))) | 272 | (notzerop (hangul-djamo 'cho (aref hangul-queue 0) char))) |
| 268 | (aset hangul-queue 1 char))) | 273 | (aset hangul-queue 1 char))) |
| 269 | (hangul-insert-character hangul-queue) | 274 | (hangul-insert-character hangul-queue) |
| 270 | (hangul-insert-character hangul-queue | 275 | (hangul-insert-character hangul-queue |
| 271 | (setq hangul-queue (vector char 0 0 0 0 0))))) | 276 | (setq hangul-queue (vector char 0 0 0 0 0))))) |
| 272 | 277 | ||
| 273 | (defsubst hangul3-input-method-jung (char) | 278 | (defsubst hangul3-input-method-jung (char) |
| 274 | "Store hangul jamo indice CHAR in `hangul-queue'. | 279 | "Store Hangul Jamo indice CHAR in `hangul-queue'. |
| 275 | Maybe, it is a Hangul 3-Bulsik jungseong. | 280 | It is a Hangul 3-Bulsik Jungseong. |
| 276 | This function process a Hangul 3-Bulsik jungseong. | 281 | This function process a Hangul 3-Bulsik Jungseong. |
| 282 | The Jungseong can be located in a Jungseong position. | ||
| 277 | Other parts are the same as a `hangul3-input-method-cho'." | 283 | Other parts are the same as a `hangul3-input-method-cho'." |
| 278 | (if (cond ((and (zerop (aref hangul-queue 2)) | 284 | (if (cond ((and (zerop (aref hangul-queue 2)) |
| 279 | (zerop (aref hangul-queue 4))) | 285 | (zerop (aref hangul-queue 4))) |
| @@ -282,13 +288,14 @@ Other parts are the same as a `hangul3-input-method-cho'." | |||
| 282 | (notzerop (hangul-djamo 'jung (aref hangul-queue 2) char))) | 288 | (notzerop (hangul-djamo 'jung (aref hangul-queue 2) char))) |
| 283 | (aset hangul-queue 3 char))) | 289 | (aset hangul-queue 3 char))) |
| 284 | (hangul-insert-character hangul-queue) | 290 | (hangul-insert-character hangul-queue) |
| 285 | (hangul-insert-character hangul-queue | 291 | (hangul-insert-character hangul-queue |
| 286 | (setq hangul-queue (vector 0 0 char 0 0 0))))) | 292 | (setq hangul-queue (vector 0 0 char 0 0 0))))) |
| 287 | 293 | ||
| 288 | (defsubst hangul3-input-method-jong (char) | 294 | (defsubst hangul3-input-method-jong (char) |
| 289 | "Store hangul jamo indice CHAR in `hangul-queue'. | 295 | "Store Hangul Jamo indice CHAR in `hangul-queue'. |
| 290 | Maybe, it is a Hangul 3-Bulsik jongseong. | 296 | It is a Hangul 3-Bulsik Jongseong. |
| 291 | This function process a Hangul 3-Bulsik jongseong. | 297 | This function process a Hangul 3-Bulsik Jongseong. |
| 298 | The Jongseong can be located in a Jongseong position. | ||
| 292 | Other parts are the same as a `hangul3-input-method-cho'." | 299 | Other parts are the same as a `hangul3-input-method-cho'." |
| 293 | (if (cond ((and (zerop (aref hangul-queue 4)) | 300 | (if (cond ((and (zerop (aref hangul-queue 4)) |
| 294 | (notzerop (aref hangul-queue 0)) | 301 | (notzerop (aref hangul-queue 0)) |
| @@ -328,13 +335,13 @@ Other parts are the same as a `hangul3-input-method-cho'." | |||
| 328 | char))))) | 335 | char))))) |
| 329 | (aset hangul-queue 6 char))) | 336 | (aset hangul-queue 6 char))) |
| 330 | (hangul-insert-character hangul-queue) | 337 | (hangul-insert-character hangul-queue) |
| 331 | (if (zerop (apply '+ (append hangul-queue nil))) | 338 | (if (zerop (apply '+ (append hangul-queue nil))) |
| 332 | (hangul-insert-character (setq hangul-queue (vector 0 0 0 0 char 0))) | 339 | (hangul-insert-character (setq hangul-queue (vector 0 0 0 0 char 0))) |
| 333 | (hangul-insert-character hangul-queue | 340 | (hangul-insert-character hangul-queue |
| 334 | (setq hangul-queue (vector 0 0 0 0 char 0)))))) | 341 | (setq hangul-queue (vector 0 0 0 0 char 0)))))) |
| 335 | 342 | ||
| 336 | (defun hangul-delete-backward-char () | 343 | (defun hangul-delete-backward-char () |
| 337 | "Delete the previous hangul character by jaso units." | 344 | "Delete the previous hangul character by Jaso units." |
| 338 | (interactive) | 345 | (interactive) |
| 339 | (let ((i 5)) | 346 | (let ((i 5)) |
| 340 | (while (and (> i 0) (zerop (aref hangul-queue i))) | 347 | (while (and (> i 0) (zerop (aref hangul-queue i))) |
| @@ -342,7 +349,7 @@ Other parts are the same as a `hangul3-input-method-cho'." | |||
| 342 | (aset hangul-queue i 0)) | 349 | (aset hangul-queue i 0)) |
| 343 | (if (notzerop (apply '+ (append hangul-queue nil))) | 350 | (if (notzerop (apply '+ (append hangul-queue nil))) |
| 344 | (hangul-insert-character hangul-queue) | 351 | (hangul-insert-character hangul-queue) |
| 345 | (delete-backward-char 1))) | 352 | (delete-backward-char 1))) |
| 346 | 353 | ||
| 347 | (defun hangul-to-hanja-conversion () | 354 | (defun hangul-to-hanja-conversion () |
| 348 | "Convert the previous hangul character to the corresponding hanja character." | 355 | "Convert the previous hangul character to the corresponding hanja character." |
| @@ -368,35 +375,35 @@ Other parts are the same as a `hangul3-input-method-cho'." | |||
| 368 | (t 0))))) | 375 | (t 0))))) |
| 369 | (if (< char 31) | 376 | (if (< char 31) |
| 370 | (hangul2-input-method-jaum char) | 377 | (hangul2-input-method-jaum char) |
| 371 | (hangul2-input-method-moum char)))) | 378 | (hangul2-input-method-moum char)))) |
| 372 | 379 | ||
| 373 | (defun hangul2-input-method (key) | 380 | (defun hangul2-input-method (key) |
| 374 | "2-Bulsik input method." | 381 | "2-Bulsik input method." |
| 375 | (if (or buffer-read-only (not (alphabetp key))) | 382 | (if (or buffer-read-only (not (alphabetp key))) |
| 376 | (list key) | 383 | (list key) |
| 377 | (quail-setup-overlays nil) | 384 | (quail-setup-overlays nil) |
| 378 | (let ((input-method-function nil) | 385 | (let ((input-method-function nil) |
| 379 | (echo-keystrokes 0) | 386 | (echo-keystrokes 0) |
| 380 | (help-char nil)) | 387 | (help-char nil)) |
| 381 | (setq hangul-queue (make-vector 6 0)) | 388 | (setq hangul-queue (make-vector 6 0)) |
| 382 | (hangul2-input-method-internal key) | 389 | (hangul2-input-method-internal key) |
| 383 | (unwind-protect | 390 | (unwind-protect |
| 384 | (catch 'exit-input-loop | 391 | (catch 'exit-input-loop |
| 385 | (while t | 392 | (while t |
| 386 | (let* ((seq (read-key-sequence nil)) | 393 | (let* ((seq (read-key-sequence nil)) |
| 387 | (cmd (lookup-key hangul-im-keymap seq)) | 394 | (cmd (lookup-key hangul-im-keymap seq)) |
| 388 | key) | 395 | key) |
| 389 | (cond ((and (stringp seq) | 396 | (cond ((and (stringp seq) |
| 390 | (= 1 (length seq)) | 397 | (= 1 (length seq)) |
| 391 | (setq key (aref seq 0)) | 398 | (setq key (aref seq 0)) |
| 392 | (alphabetp key)) | 399 | (alphabetp key)) |
| 393 | (hangul2-input-method-internal key)) | 400 | (hangul2-input-method-internal key)) |
| 394 | ((commandp cmd) | 401 | ((commandp cmd) |
| 395 | (call-interactively cmd)) | 402 | (call-interactively cmd)) |
| 396 | (t | 403 | (t |
| 397 | (setq unread-command-events (listify-key-sequence seq)) | 404 | (setq unread-command-events (listify-key-sequence seq)) |
| 398 | (throw 'exit-input-loop nil)))))) | 405 | (throw 'exit-input-loop nil)))))) |
| 399 | (quail-delete-overlays))))) | 406 | (quail-delete-overlays))))) |
| 400 | 407 | ||
| 401 | ;; Support function for `hangul3-input-method'. Actually, this | 408 | ;; Support function for `hangul3-input-method'. Actually, this |
| 402 | ;; function handles the Hangul 3-Bulsik final. KEY is an entered key | 409 | ;; function handles the Hangul 3-Bulsik final. KEY is an entered key |
| @@ -418,29 +425,29 @@ Other parts are the same as a `hangul3-input-method-cho'." | |||
| 418 | "3-Bulsik final input method." | 425 | "3-Bulsik final input method." |
| 419 | (if (or buffer-read-only (< key 33) (>= key 127)) | 426 | (if (or buffer-read-only (< key 33) (>= key 127)) |
| 420 | (list key) | 427 | (list key) |
| 421 | (quail-setup-overlays nil) | 428 | (quail-setup-overlays nil) |
| 422 | (let ((input-method-function nil) | 429 | (let ((input-method-function nil) |
| 423 | (echo-keystrokes 0) | 430 | (echo-keystrokes 0) |
| 424 | (help-char nil)) | 431 | (help-char nil)) |
| 425 | (setq hangul-queue (make-vector 6 0)) | 432 | (setq hangul-queue (make-vector 6 0)) |
| 426 | (hangul3-input-method-internal key) | 433 | (hangul3-input-method-internal key) |
| 427 | (unwind-protect | 434 | (unwind-protect |
| 428 | (catch 'exit-input-loop | 435 | (catch 'exit-input-loop |
| 429 | (while t | 436 | (while t |
| 430 | (let* ((seq (read-key-sequence nil)) | 437 | (let* ((seq (read-key-sequence nil)) |
| 431 | (cmd (lookup-key hangul-im-keymap seq)) | 438 | (cmd (lookup-key hangul-im-keymap seq)) |
| 432 | key) | 439 | key) |
| 433 | (cond ((and (stringp seq) | 440 | (cond ((and (stringp seq) |
| 434 | (= 1 (length seq)) | 441 | (= 1 (length seq)) |
| 435 | (setq key (aref seq 0)) | 442 | (setq key (aref seq 0)) |
| 436 | (and (>= key 33) (< key 127))) | 443 | (and (>= key 33) (< key 127))) |
| 437 | (hangul3-input-method-internal key)) | 444 | (hangul3-input-method-internal key)) |
| 438 | ((commandp cmd) | 445 | ((commandp cmd) |
| 439 | (call-interactively cmd)) | 446 | (call-interactively cmd)) |
| 440 | (t | 447 | (t |
| 441 | (setq unread-command-events (listify-key-sequence seq)) | 448 | (setq unread-command-events (listify-key-sequence seq)) |
| 442 | (throw 'exit-input-loop nil)))))) | 449 | (throw 'exit-input-loop nil)))))) |
| 443 | (quail-delete-overlays))))) | 450 | (quail-delete-overlays))))) |
| 444 | 451 | ||
| 445 | ;; Support function for `hangul390-input-method'. Actually, this | 452 | ;; Support function for `hangul390-input-method'. Actually, this |
| 446 | ;; function handles the Hangul 3-Bulsik 390. KEY is an entered key | 453 | ;; function handles the Hangul 3-Bulsik 390. KEY is an entered key |
| @@ -463,29 +470,29 @@ Other parts are the same as a `hangul3-input-method-cho'." | |||
| 463 | "3-Bulsik 390 input method." | 470 | "3-Bulsik 390 input method." |
| 464 | (if (or buffer-read-only (< key 33) (>= key 127)) | 471 | (if (or buffer-read-only (< key 33) (>= key 127)) |
| 465 | (list key) | 472 | (list key) |
| 466 | (quail-setup-overlays nil) | 473 | (quail-setup-overlays nil) |
| 467 | (let ((input-method-function nil) | 474 | (let ((input-method-function nil) |
| 468 | (echo-keystrokes 0) | 475 | (echo-keystrokes 0) |
| 469 | (help-char nil)) | 476 | (help-char nil)) |
| 470 | (setq hangul-queue (make-vector 6 0)) | 477 | (setq hangul-queue (make-vector 6 0)) |
| 471 | (hangul390-input-method-internal key) | 478 | (hangul390-input-method-internal key) |
| 472 | (unwind-protect | 479 | (unwind-protect |
| 473 | (catch 'exit-input-loop | 480 | (catch 'exit-input-loop |
| 474 | (while t | 481 | (while t |
| 475 | (let* ((seq (read-key-sequence nil)) | 482 | (let* ((seq (read-key-sequence nil)) |
| 476 | (cmd (lookup-key hangul-im-keymap seq)) | 483 | (cmd (lookup-key hangul-im-keymap seq)) |
| 477 | key) | 484 | key) |
| 478 | (cond ((and (stringp seq) | 485 | (cond ((and (stringp seq) |
| 479 | (= 1 (length seq)) | 486 | (= 1 (length seq)) |
| 480 | (setq key (aref seq 0)) | 487 | (setq key (aref seq 0)) |
| 481 | (and (>= key 33) (< key 127))) | 488 | (and (>= key 33) (< key 127))) |
| 482 | (hangul390-input-method-internal key)) | 489 | (hangul390-input-method-internal key)) |
| 483 | ((commandp cmd) | 490 | ((commandp cmd) |
| 484 | (call-interactively cmd)) | 491 | (call-interactively cmd)) |
| 485 | (t | 492 | (t |
| 486 | (setq unread-command-events (listify-key-sequence seq)) | 493 | (setq unread-command-events (listify-key-sequence seq)) |
| 487 | (throw 'exit-input-loop nil)))))) | 494 | (throw 'exit-input-loop nil)))))) |
| 488 | (quail-delete-overlays))))) | 495 | (quail-delete-overlays))))) |
| 489 | 496 | ||
| 490 | ;; Text shown by describe-input-method. Set to a proper text by | 497 | ;; Text shown by describe-input-method. Set to a proper text by |
| 491 | ;; hangul-input-method-activate. | 498 | ;; hangul-input-method-activate. |
| @@ -497,8 +504,8 @@ Other parts are the same as a `hangul3-input-method-cho'." | |||
| 497 | FUNC is a function to handle input key. | 504 | FUNC is a function to handle input key. |
| 498 | HELP-TEXT is a text set in `hangul-input-method-help-text'." | 505 | HELP-TEXT is a text set in `hangul-input-method-help-text'." |
| 499 | (setq inactivate-current-input-method-function 'hangul-input-method-inactivate | 506 | (setq inactivate-current-input-method-function 'hangul-input-method-inactivate |
| 500 | describe-current-input-method-function 'hangul-input-method-help | 507 | describe-current-input-method-function 'hangul-input-method-help |
| 501 | hangul-input-method-help-text help-text) | 508 | hangul-input-method-help-text help-text) |
| 502 | (quail-delete-overlays) | 509 | (quail-delete-overlays) |
| 503 | (if (eq (selected-window) (minibuffer-window)) | 510 | (if (eq (selected-window) (minibuffer-window)) |
| 504 | (add-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer)) | 511 | (add-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer)) |
| @@ -509,9 +516,9 @@ HELP-TEXT is a text set in `hangul-input-method-help-text'." | |||
| 509 | (interactive) | 516 | (interactive) |
| 510 | (unwind-protect | 517 | (unwind-protect |
| 511 | (progn | 518 | (progn |
| 512 | (quail-hide-guidance) | 519 | (quail-hide-guidance) |
| 513 | (quail-delete-overlays) | 520 | (quail-delete-overlays) |
| 514 | (setq describe-current-input-method-function nil)) | 521 | (setq describe-current-input-method-function nil)) |
| 515 | (kill-local-variable 'input-method-function))) | 522 | (kill-local-variable 'input-method-function))) |
| 516 | 523 | ||
| 517 | (defun hangul-input-method-help () | 524 | (defun hangul-input-method-help () |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 67da7b82c0d..215a0404967 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-06-07 Jihyun Cho <jihyun.jo@gmail.com> | ||
| 2 | |||
| 3 | * language/hanja-util.el (hanja-init-load): Use a char-table for | ||
| 4 | hanja-table. | ||
| 5 | (hangul-to-hanja-char): Adjusted for the above change. | ||
| 6 | |||
| 1 | 2008-06-07 Glenn Morris <rgm@gnu.org> | 7 | 2008-06-07 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * finder.el (finder-compile-keywords): Use lm-keywords-list rather than | 9 | * finder.el (finder-compile-keywords): Use lm-keywords-list rather than |