summaryrefslogtreecommitdiff
path: root/leim
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2009-06-23 02:11:35 +0000
committerKenichi Handa <handa@m17n.org>2009-06-23 02:11:35 +0000
commit8000b1d55bd9700de61660c7f6ce7939de5e2eab (patch)
treeeb6de122bf597b5e5ce654ce3d52129552a0d5b3 /leim
parentd6b951bbeedef393203aebfc66c6e432d4ba0c4b (diff)
downloademacs-8000b1d55bd9700de61660c7f6ce7939de5e2eab.tar.gz
(hangul-to-hanja-conversion): When it is called
while korean input method is off, convert the following character.
Diffstat (limited to 'leim')
-rw-r--r--leim/quail/hangul.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/leim/quail/hangul.el b/leim/quail/hangul.el
index 6ebfd2ef03c..3f963d732f8 100644
--- a/leim/quail/hangul.el
+++ b/leim/quail/hangul.el
@@ -355,17 +355,24 @@ Other parts are the same as a `hangul3-input-method-cho'."
(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