Mercurial > emacs
changeset 103537:74a0e28c79d9
(hangul-to-hanja-conversion): When it is called
while korean input method is off, convert the following character.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 23 Jun 2009 02:11:35 +0000 |
parents | eb2da52913a4 |
children | ec2e82c2fc34 |
files | leim/quail/hangul.el |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/leim/quail/hangul.el Mon Jun 22 21:40:24 2009 +0000 +++ b/leim/quail/hangul.el Tue Jun 23 02:11:35 2009 +0000 @@ -355,17 +355,24 @@ (delete-backward-char 1))) (defun hangul-to-hanja-conversion () - "Convert the previous hangul character to the corresponding hanja character." + "Convert the previous hangul character to the corresponding hanja character. +When a Korean input method is off, convert the following hangul character." (interactive) (let ((echo-keystrokes 0) delete-func hanja-character) - (setq hanja-character (hangul-to-hanja-char (preceding-char))) + (if (and (overlayp quail-overlay) (overlay-start quail-overlay)) + (progn + (setq hanja-character (hangul-to-hanja-char (preceding-char))) + (setq delete-func (lambda () (delete-backward-char 1)))) + (setq hanja-character (hangul-to-hanja-char (following-char))) + (setq delete-func (lambda () (delete-char 1)))) (when hanja-character - (delete-backward-char 1) + (funcall delete-func) (insert hanja-character) (setq hangul-queue (make-vector 6 0)) - (move-overlay quail-overlay (point) (point))))) + (if (and (overlayp quail-overlay) (overlay-start quail-overlay)) + (move-overlay quail-overlay (point) (point)))))) ;; Support function for `hangul2-input-method'. Actually, this ;; function handles the Hangul 2-Bulsik. KEY is an entered key code