17052
|
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
|
|
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
23
|
|
24 ;;; Commentary:
|
|
25
|
|
26 ;; For Korean, the character set KSC5601 is supported.
|
|
27
|
|
28 ;;; Code:
|
|
29
|
|
30 (make-coding-system
|
|
31 'coding-system-euc-korea 2 ?K
|
|
32 "Coding-system of Korean EUC (Extended Unix Code)."
|
|
33 '((ascii t) korean-ksc5601 nil nil
|
|
34 nil ascii-eol ascii-cntl))
|
|
35
|
|
36 ;; EUC-KR is an alias for EUC-KOREA.
|
|
37 (put 'coding-system-euc-kr 'coding-system 'coding-system-euc-korea)
|
|
38
|
|
39 (make-coding-system
|
|
40 'coding-system-iso-2022-kr 2 ?k
|
|
41 "Coding-System used for communication with mail in Korea."
|
|
42 '(ascii (nil korean-ksc5601) nil nil
|
|
43 nil ascii-eol ascii-cntl seven locking-shift))
|
|
44
|
|
45 (register-input-method
|
|
46 "Korean" '("quail-hangul" quail-use-package "quail/hangul"))
|
|
47 (register-input-method
|
|
48 "Korean" '("quail-hangul3" quail-use-package "quail/hangul3"))
|
|
49 (register-input-method
|
|
50 "Korean" '("quail-hanja" quail-use-package "quail/hanja"))
|
|
51 (register-input-method
|
|
52 "Korean" '("quail-symbol-ksc" quail-use-package "quail/symbol-ksc"))
|
|
53 (register-input-method
|
|
54 "Korean" '("quail-hanja-jis" quail-use-package "quail/hanja-jis"))
|
|
55
|
|
56 (defun setup-korean-environment ()
|
|
57 (setq coding-category-iso-8-2 'coding-system-euc-korea)
|
|
58
|
|
59 (set-coding-priority
|
|
60 '(coding-category-iso-7
|
|
61 coding-category-iso-8-2
|
|
62 coding-category-iso-8-1))
|
|
63
|
|
64 (setq-default buffer-file-coding-system 'coding-system-euc-korea)
|
|
65
|
|
66 (setq default-input-method '("Korean" . "quail-hangul"))
|
|
67 )
|
|
68
|
|
69 (set-language-info-alist
|
|
70 "Korean" '((setup-function . setup-korean-environment)
|
|
71 (tutorial . "TUTORIAL.kr")
|
|
72 (charset . (korean-ksc5601))
|
|
73 (coding-system . (coding-system-euc-korea
|
|
74 coding-system-iso-2022-kr))
|
|
75 (documentation . t)
|
|
76 (sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B")))
|
|
77
|
|
78 ;;; korean.el ends here
|