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
|
|
32 ;; Syntax of Korean characters.
|
|
33 (loop for row from 33 to 34 do
|
|
34 (modify-syntax-entry `[korean-ksc5601 ,row] "."))
|
|
35 (loop for row from 35 to 37 do
|
|
36 (modify-syntax-entry `[korean-ksc5601 ,row] "w"))
|
|
37 (loop for row from 38 to 41 do
|
|
38 (modify-syntax-entry `[korean-ksc5601 ,row] "."))
|
|
39 (loop for row from 42 to 126 do
|
|
40 (modify-syntax-entry `[korean-ksc5601 ,row] "w"))
|
|
41
|
|
42 ;; Setting for coding-system and quail were moved to
|
|
43 ;; language/korean.el.
|
|
44
|
|
45 (make-coding-system
|
|
46 'iso-2022-int-1 'iso2022
|
|
47 "ISO-2022-INT-1"
|
|
48 '(charset-g0 ascii
|
|
49 charset-g1 korean-ksc5601
|
|
50 short t
|
|
51 seven t
|
|
52 lock-shift t
|
|
53 mnemonic "INT-1"))
|
|
54
|
|
55 ;; EGG specific setup
|
|
56 (define-egg-environment 'korean
|
|
57 "Korean settings for egg"
|
|
58 (lambda ()
|
|
59 (when (not (featurep 'egg-kor))
|
|
60 (load "its-hangul")
|
|
61 (setq its:*standard-modes*
|
|
62 (cons (its:get-mode-map "hangul") its:*standard-modes*))
|
|
63 (provide 'egg-kor))
|
|
64 (setq wnn-server-type 'kserver)
|
|
65 (setq egg-default-startup-file "eggrc-wnn")
|
|
66 (setq-default its:*current-map* (its:get-mode-map "hangul"))))
|
|
67
|
|
68 ;; (make-coding-system
|
|
69 ;; 'korean-iso-8bit 2 ?K
|
|
70 ;; "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)"
|
|
71 ;; '(ascii korean-ksc5601 nil nil
|
|
72 ;; nil ascii-eol ascii-cntl)
|
|
73 ;; '((safe-charsets ascii korean-ksc5601)
|
|
74 ;; (mime-charset . euc-kr)))
|
|
75
|
|
76 (make-coding-system
|
|
77 'euc-kr 'iso2022
|
|
78 "Coding-system of Korean EUC (Extended Unix Code)."
|
|
79 '(charset-g0 ascii
|
|
80 charset-g1 korean-ksc5601
|
|
81 mnemonic "ko/EUC"
|
|
82 eol-type nil))
|
|
83
|
|
84 ;;(define-coding-system-alias 'euc-kr 'euc-korea)
|
|
85
|
|
86 (define-coding-system-alias 'korean-euc 'euc-kr)
|
|
87
|
|
88 ;; (make-coding-system
|
|
89 ;; 'iso-2022-kr 2 ?k
|
|
90 ;; "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)."
|
|
91 ;; '(ascii (nil korean-ksc5601) nil nil
|
|
92 ;; nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil
|
|
93 ;; designation-bol)
|
|
94 ;; '((safe-charsets ascii korean-ksc5601)
|
|
95 ;; (mime-charset . iso-2022-kr)))
|
|
96
|
|
97 (make-coding-system
|
|
98 'iso-2022-kr 'iso2022
|
|
99 "Coding-System used for communication with mail in Korea."
|
|
100 '(charset-g0 ascii
|
|
101 charset-g1 korean-ksc5601
|
|
102 force-g1-on-output t
|
|
103 seven t
|
|
104 lock-shift t
|
|
105 mnemonic "Ko/7bit"
|
|
106 eol-type lf))
|
|
107
|
|
108 ;; (define-coding-system-alias 'korean-iso-7bit-lock 'iso-2022-kr)
|
|
109
|
|
110 (set-language-info-alist
|
|
111 "Korean" '((setup-function . setup-korean-environment-internal)
|
|
112 (exit-function . exit-korean-environment)
|
|
113 (tutorial . "TUTORIAL.ko")
|
|
114 (charset korean-ksc5601)
|
|
115 (coding-system euc-kr iso-2022-kr)
|
|
116 (coding-priority euc-kr iso-2022-kr)
|
|
117 (input-method . "korean-hangul")
|
|
118 (features korea-util)
|
|
119 (sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B")
|
|
120 (documentation . "\
|
|
121 The following key bindings are available while using Korean input methods:
|
|
122 Shift-SPC: toggle-korean-input-mthod
|
|
123 Control-F9: quail-hangul-switch-symbol-ksc
|
|
124 F9: quail-hangul-switch-hanja")
|
|
125 ))
|
|
126
|
|
127 ;;; korean.el ends here
|