]> code.delx.au - gnu-emacs/blob - lisp/language/korean.el
Fix FSF address in comment.
[gnu-emacs] / lisp / language / korean.el
1 ;;; korean.el --- Support for Korean
2
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
5
6 ;; Keywords: multilingual, Korean
7
8 ;; This file is part of GNU Emacs.
9
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
14
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
24
25 ;;; Commentary:
26
27 ;; For Korean, the character set KSC5601 is supported.
28
29 ;;; Code:
30
31 (make-coding-system
32 'coding-system-euc-korea 2 ?K
33 "Coding-system of Korean EUC (Extended Unix Code)."
34 '((ascii t) korean-ksc5601 nil nil
35 nil ascii-eol ascii-cntl))
36
37 ;; EUC-KR is an alias for EUC-KOREA.
38 (put 'coding-system-euc-kr 'coding-system 'coding-system-euc-korea)
39
40 (make-coding-system
41 'coding-system-iso-2022-kr 2 ?k
42 "Coding-System used for communication with mail in Korea."
43 '(ascii (nil korean-ksc5601) nil nil
44 nil ascii-eol ascii-cntl seven locking-shift))
45
46 (register-input-method
47 "Korean" '("quail-hangul" quail-use-package "quail/hangul"))
48 (register-input-method
49 "Korean" '("quail-hangul3" quail-use-package "quail/hangul3"))
50 (register-input-method
51 "Korean" '("quail-hanja" quail-use-package "quail/hanja"))
52 (register-input-method
53 "Korean" '("quail-symbol-ksc" quail-use-package "quail/symbol-ksc"))
54 (register-input-method
55 "Korean" '("quail-hanja-jis" quail-use-package "quail/hanja-jis"))
56
57 (defun setup-korean-environment ()
58 (setq coding-category-iso-8-2 'coding-system-euc-korea)
59
60 (set-coding-priority
61 '(coding-category-iso-7
62 coding-category-iso-8-2
63 coding-category-iso-8-1))
64
65 (setq-default buffer-file-coding-system 'coding-system-euc-korea)
66
67 (setq default-input-method '("Korean" . "quail-hangul"))
68 )
69
70 (set-language-info-alist
71 "Korean" '((setup-function . setup-korean-environment)
72 (tutorial . "TUTORIAL.kr")
73 (charset . (korean-ksc5601))
74 (coding-system . (coding-system-euc-korea
75 coding-system-iso-2022-kr))
76 (documentation . t)
77 (sample-text . "Hangul (\e$(CGQ1[\e(B) \e$(C>H3gGO<<?d\e(B, \e$(C>H3gGO=J4O1n\e(B")))
78
79 ;;; korean.el ends here