428
|
1 ;;; korean.el --- Support for Korean -*- coding: iso-2022-7bit; -*-
|
|
2
|
|
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
|
|
4 ;; Licensed to the Free Software Foundation.
|
|
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
|
|
6
|
|
7 ;; Keywords: multilingual, Korean
|
|
8
|
|
9 ;; This file is part of XEmacs.
|
|
10
|
|
11 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
12 ;; under the terms of the GNU General Public License as published by
|
|
13 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
14 ;; any later version.
|
|
15
|
|
16 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
19 ;; General Public License for more details.
|
|
20
|
|
21 ;; You should have received a copy of the GNU General Public License
|
|
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
|
|
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
24 ;; 02111-1307, USA.
|
|
25
|
|
26 ;;; Commentary:
|
|
27
|
|
28 ;; For Korean, the character set KSC5601 is supported.
|
|
29
|
|
30 ;;; Code:
|
|
31
|
778
|
32 ; (make-charset 'korean-ksc5601
|
|
33 ; "KSC5601 Korean Hangul and Hanja: ISO-IR-149"
|
|
34 ; '(dimension
|
|
35 ; 2
|
|
36 ; registry "KSC5601.1989"
|
|
37 ; chars 94
|
|
38 ; columns 2
|
|
39 ; direction l2r
|
|
40 ; final ?C
|
|
41 ; graphic 0
|
|
42 ; short-name "KSC5601"
|
|
43 ; long-name "KSC5601 (Korean): ISO-IR-149"
|
|
44 ; ))
|
|
45
|
428
|
46 ;; Syntax of Korean characters.
|
|
47 (loop for row from 33 to 34 do
|
|
48 (modify-syntax-entry `[korean-ksc5601 ,row] "."))
|
|
49 (loop for row from 35 to 37 do
|
|
50 (modify-syntax-entry `[korean-ksc5601 ,row] "w"))
|
|
51 (loop for row from 38 to 41 do
|
|
52 (modify-syntax-entry `[korean-ksc5601 ,row] "."))
|
|
53 (loop for row from 42 to 126 do
|
|
54 (modify-syntax-entry `[korean-ksc5601 ,row] "w"))
|
|
55
|
|
56 ;; Setting for coding-system and quail were moved to
|
|
57 ;; language/korean.el.
|
|
58
|
|
59 (make-coding-system
|
|
60 'iso-2022-int-1 'iso2022
|
771
|
61 "ISO-2022-INT-1 (Korean)"
|
428
|
62 '(charset-g0 ascii
|
|
63 charset-g1 korean-ksc5601
|
|
64 short t
|
|
65 seven t
|
|
66 lock-shift t
|
|
67 mnemonic "INT-1"))
|
|
68
|
|
69 ;; EGG specific setup
|
|
70 (define-egg-environment 'korean
|
|
71 "Korean settings for egg"
|
|
72 (lambda ()
|
771
|
73 (with-boundp '(its:*standard-modes* its:*current-map* wnn-server-type
|
|
74 egg-default-startup-file)
|
|
75 (with-fboundp 'its:get-mode-map
|
|
76 (when (not (featurep 'egg-kor))
|
|
77 (load "its-hangul")
|
|
78 (setq its:*standard-modes*
|
|
79 (cons (its:get-mode-map "hangul") its:*standard-modes*))
|
|
80 (provide 'egg-kor))
|
|
81 (setq wnn-server-type 'kserver)
|
|
82 (setq egg-default-startup-file "eggrc-wnn")
|
|
83 (setq-default its:*current-map* (its:get-mode-map "hangul"))))))
|
428
|
84
|
|
85 ;; (make-coding-system
|
|
86 ;; 'korean-iso-8bit 2 ?K
|
|
87 ;; "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)"
|
|
88 ;; '(ascii korean-ksc5601 nil nil
|
|
89 ;; nil ascii-eol ascii-cntl)
|
|
90 ;; '((safe-charsets ascii korean-ksc5601)
|
|
91 ;; (mime-charset . euc-kr)))
|
|
92
|
|
93 (make-coding-system
|
|
94 'euc-kr 'iso2022
|
771
|
95 "Korean EUC"
|
428
|
96 '(charset-g0 ascii
|
|
97 charset-g1 korean-ksc5601
|
|
98 mnemonic "ko/EUC"
|
771
|
99 documentation
|
|
100 "Korean EUC (Extended Unix Code), the standard Korean encoding on Unix.
|
|
101 This follows the same overall EUC principles (see the description under
|
|
102 Japanese EUC), but specifies different character sets:
|
|
103
|
|
104 G0: ASCII
|
|
105 G1: Korean-KSC5601"
|
428
|
106 eol-type nil))
|
|
107
|
|
108 ;;(define-coding-system-alias 'euc-kr 'euc-korea)
|
|
109
|
|
110 (define-coding-system-alias 'korean-euc 'euc-kr)
|
|
111
|
|
112 ;; (make-coding-system
|
|
113 ;; 'iso-2022-kr 2 ?k
|
|
114 ;; "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)."
|
|
115 ;; '(ascii (nil korean-ksc5601) nil nil
|
|
116 ;; nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil
|
|
117 ;; designation-bol)
|
|
118 ;; '((safe-charsets ascii korean-ksc5601)
|
|
119 ;; (mime-charset . iso-2022-kr)))
|
|
120
|
|
121 (make-coding-system
|
|
122 'iso-2022-kr 'iso2022
|
771
|
123 "ISO-2022-KR (Korean mail)"
|
428
|
124 '(charset-g0 ascii
|
|
125 charset-g1 korean-ksc5601
|
|
126 force-g1-on-output t
|
|
127 seven t
|
|
128 lock-shift t
|
|
129 mnemonic "Ko/7bit"
|
771
|
130 documentation "Coding-System used for communication with mail in Korea."
|
428
|
131 eol-type lf))
|
|
132
|
|
133 ;; (define-coding-system-alias 'korean-iso-7bit-lock 'iso-2022-kr)
|
|
134
|
|
135 (set-language-info-alist
|
|
136 "Korean" '((setup-function . setup-korean-environment-internal)
|
|
137 (exit-function . exit-korean-environment)
|
|
138 (tutorial . "TUTORIAL.ko")
|
|
139 (charset korean-ksc5601)
|
|
140 (coding-system euc-kr iso-2022-kr)
|
|
141 (coding-priority euc-kr iso-2022-kr)
|
771
|
142 (locale "ko_KR.eucKR" "ko_KR.EUC" "ko_KR.euc" "ko_KR" "ko")
|
|
143 (native-coding-system euc-kr)
|
428
|
144 (input-method . "korean-hangul")
|
|
145 (features korea-util)
|
|
146 (sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B")
|
|
147 (documentation . "\
|
|
148 The following key bindings are available while using Korean input methods:
|
|
149 Shift-SPC: toggle-korean-input-mthod
|
|
150 Control-F9: quail-hangul-switch-symbol-ksc
|
|
151 F9: quail-hangul-switch-hanja")
|
|
152 ))
|
|
153
|
|
154 ;;; korean.el ends here
|