Mercurial > emacs
comparison lisp/language/korea-util.el @ 103466:5fe572f454c7
(korean-key-bindings): Add binding for key Hangul.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 18 Jun 2009 01:02:02 +0000 |
parents | a9dc0e7c3f2b |
children | fb1ed86c4fa8 |
comparison
equal
deleted
inserted
replaced
103465:35c3a2593d2b | 103466:5fe572f454c7 |
---|---|
95 (isearch-update)) | 95 (isearch-update)) |
96 | 96 |
97 ;; Information for setting and exiting Korean environment. | 97 ;; Information for setting and exiting Korean environment. |
98 (defvar korean-key-bindings | 98 (defvar korean-key-bindings |
99 `((global [?\S- ] toggle-korean-input-method nil) | 99 `((global [?\S- ] toggle-korean-input-method nil) |
100 (global [Hangul] toggle-korean-input-method nil) | |
100 (global [C-f9] quail-hangul-switch-symbol-ksc nil) | 101 (global [C-f9] quail-hangul-switch-symbol-ksc nil) |
101 (global [f9] quail-hangul-switch-hanja nil) | 102 (global [f9] quail-hangul-switch-hanja nil) |
102 (,isearch-mode-map [?\S- ] isearch-toggle-korean-input-method nil) | 103 (,isearch-mode-map [?\S- ] isearch-toggle-korean-input-method nil) |
104 (,isearch-mode-map [Hangul] isearch-toggle-korean-input-method nil) | |
103 (,isearch-mode-map [C-f9] isearch-hangul-switch-symbol-ksc nil) | 105 (,isearch-mode-map [C-f9] isearch-hangul-switch-symbol-ksc nil) |
104 (,isearch-mode-map [f9] isearch-hangul-switch-hanja nil))) | 106 (,isearch-mode-map [f9] isearch-hangul-switch-hanja nil))) |
105 | 107 |
106 ;;;###autoload | 108 ;;;###autoload |
107 (defun setup-korean-environment-internal () | 109 (defun setup-korean-environment-internal () |
116 (setq old-def (global-key-binding key)) | 118 (setq old-def (global-key-binding key)) |
117 (global-set-key key new-def)) | 119 (global-set-key key new-def)) |
118 (setq old-def (lookup-key (car this) key)) | 120 (setq old-def (lookup-key (car this) key)) |
119 (define-key (car this) key new-def)) | 121 (define-key (car this) key new-def)) |
120 (setcar (nthcdr 3 this) old-def)) | 122 (setcar (nthcdr 3 this) old-def)) |
121 (setq key-bindings (cdr key-bindings))))) | 123 (setq key-bindings (cdr key-bindings)))) |
124 (use-cjk-char-width-table 'ko_KR)) | |
125 | |
122 | 126 |
123 (defun exit-korean-environment () | 127 (defun exit-korean-environment () |
124 "Exit Korean language environment." | 128 "Exit Korean language environment." |
125 (let ((key-bindings korean-key-bindings)) | 129 (let ((key-bindings korean-key-bindings)) |
126 (while key-bindings | 130 (while key-bindings |
131 (if (eq (car this) 'global) | 135 (if (eq (car this) 'global) |
132 (if (eq (global-key-binding key) new-def) | 136 (if (eq (global-key-binding key) new-def) |
133 (global-set-key key old-def)) | 137 (global-set-key key old-def)) |
134 (if (eq (lookup-key (car this) key) new-def) | 138 (if (eq (lookup-key (car this) key) new-def) |
135 (define-key (car this) key old-def)))) | 139 (define-key (car this) key old-def)))) |
136 (setq key-bindings (cdr key-bindings))))) | 140 (setq key-bindings (cdr key-bindings)))) |
141 (use-default-char-width-table)) | |
137 | 142 |
138 ;; | 143 ;; |
139 (provide 'korea-util) | 144 (provide 'korea-util) |
140 | 145 |
141 ;; arch-tag: b17d0981-05da-4577-99f8-1db87fff8b44 | 146 ;; arch-tag: b17d0981-05da-4577-99f8-1db87fff8b44 |