Mercurial > emacs
view lisp/language/korea-util.el @ 22477:9bc88c123895 gcc-2_8_1-980627 gcc-2_8_1-980705 gcc-2_8_1-980718 libc-980614 libc-980615 libc-980616 libc-980617 libc-980618 libc-980619 libc-980620 libc-980621 libc-980622 libc-980623 libc-980624 libc-980625 libc-980626 libc-980627 libc-980628 libc-980629 libc-980630 libc-980701 libc-980702 libc-980703 libc-980704 libc-980705 libc-980706 libc-980707 libc-980708 libc-980709 libc-980710 libc-980711 libc-980712 libc-980713 libc-980714 libc-980715 libc-980716 libc-980717 libc-980718 libc-980719
(sun4H:SunOS:5.*:*): New case.
author | Richard Kenner <kenner@gnu.org> |
---|---|
date | Sat, 13 Jun 1998 19:51:10 +0000 |
parents | f510736ce3d1 |
children | bcb4a7a67d13 |
line wrap: on
line source
;;; korea-util.el --- utilities for Korean ;; Copyright (C) 1997 Free Software Foundation, Inc. ;; Keywords: mule, multilingual, Korean ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Code: ;;;###autoload (defvar default-korean-keyboard "" "*The kind of Korean keyboard for Korean input method. \"\" for 2, \"3\" for 3.") ;; functions useful for Korean text input (defun toggle-korean-input-method () "Turn on or off a Korean text input method for the current buffer." (interactive) (if current-input-method (inactivate-input-method) (activate-input-method (concat "korean-hangul" default-korean-keyboard)))) (defun quail-hangul-switch-symbol-ksc (&rest ignore) "Swith to/from Korean symbol package." (interactive "i") (and current-input-method (if (string-equal current-input-method "korean-symbol") (activate-input-method (concat "korean-hangul" default-korean-keyboard)) (activate-input-method "korean-symbol")))) (defun quail-hangul-switch-hanja (&rest ignore) "Swith to/from Korean hanja package." (interactive "i") (and current-input-method (if (string-match "korean-hanja" current-input-method) (activate-input-method (concat "korean-hangul" default-korean-keyboard)) (activate-input-method (concat "korean-hanja" default-korean-keyboard))))) ;; Information for exiting Korean environment. (defvar exit-korean-environment-data nil) ;;;###autoload (defun setup-korean-environment () "Setup multilingual environment (MULE) for Korean." (interactive) (setup-english-environment) (set-language-environment-coding-systems "Korean") (setq default-input-method "korean-hangul") (let ((key-bindings '(([?\S- ] . toggle-korean-input-method) ([C-f9] . quail-hangul-switch-symbol-ksc) ([f9] . quail-hangul-switch-hanja)))) (while key-bindings (let ((prev-binding (global-key-binding (car (car key-bindings))))) (setq exit-korean-environment-data (cons (cons (car (car key-bindings)) prev-binding) exit-korean-environment-data))) (global-set-key (car (car key-bindings)) (cdr (car key-bindings))) (setq key-bindings (cdr key-bindings))))) (defun exit-korean-environment () "Exit Korean language environment." (while exit-korean-environment-data (global-set-key (car (car exit-korean-environment-data)) (cdr (car exit-korean-environment-data))) (setq exit-korean-environment-data (cdr exit-korean-environment-data)))) ;; (provide 'korea-util) ;;; korean-util.el ends here