annotate lisp/language/korean.el @ 219:262b8bb4a523 r20-4b8

Import from CVS: tag r20-4b8
author cvs
date Mon, 13 Aug 2007 10:09:35 +0200
parents 41ff10fd062f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
1 ;;; korean.el --- Support for Korean
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
2
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
4 ;; Licensed to the Free Software Foundation.
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
6
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
7 ;; Keywords: multilingual, Korean
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
8
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
10
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
14 ;; any later version.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
15
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
19 ;; General Public License for more details.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
20
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
24 ;; 02111-1307, USA.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
25
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
26 ;;; Commentary:
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
27
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
28 ;; For Korean, the character set KSC5601 is supported.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
29
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
30 ;;; Code:
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
31
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
32 ;; Syntax of Korean characters.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
33 (loop for row from 33 to 34 do
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
34 (modify-syntax-entry `[korean-ksc5601 ,row] "."))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
35 (loop for row from 35 to 37 do
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
36 (modify-syntax-entry `[korean-ksc5601 ,row] "w"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
37 (loop for row from 38 to 41 do
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
38 (modify-syntax-entry `[korean-ksc5601 ,row] "."))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
39 (loop for row from 42 to 126 do
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
40 (modify-syntax-entry `[korean-ksc5601 ,row] "w"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
41
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
42 ;; Setting for coding-system and quail were moved to
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
43 ;; language/korean.el.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
44
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
45 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
46 'iso-2022-int-1 'iso2022
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
47 "ISO-2022-INT-1"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
48 '(charset-g0 ascii
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
49 charset-g1 korean-ksc5601
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
50 short t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
51 seven t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
52 lock-shift t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
53 mnemonic "INT-1"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
54
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
55 ;; EGG specific setup
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
56 (define-egg-environment 'korean
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
57 "Korean settings for egg"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
58 (lambda ()
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
59 (when (not (featurep 'egg-kor))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
60 (load "its-hangul")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
61 (setq its:*standard-modes*
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
62 (cons (its:get-mode-map "hangul") its:*standard-modes*))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
63 (provide 'egg-kor))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
64 (setq wnn-server-type 'kserver)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
65 (setq egg-default-startup-file "eggrc-wnn")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
66 (setq-default its:*current-map* (its:get-mode-map "hangul"))))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
67
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
68 ;; (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
69 ;; 'euc-kr 2 ?K
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
70 ;; "Coding-system of Korean EUC (Extended Unix Code)."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
71 ;; '((ascii t) korean-ksc5601 nil nil
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
72 ;; nil ascii-eol ascii-cntl))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
73
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
74 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
75 'euc-kr 'iso2022
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
76 "Coding-system of Korean EUC (Extended Unix Code)."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
77 '(charset-g0 ascii
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
78 charset-g1 korean-ksc5601
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
79 mnemonic "ko/EUC"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
80 eol-type lf))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
81
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
82 ;;(define-coding-system-alias 'euc-kr 'euc-korea)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
83
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
84 (copy-coding-system 'euc-kr 'korean-euc)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
85
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
86 ;; (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
87 ;; 'iso-2022-kr 2 ?k
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
88 ;; "MIME ISO-2022-KR"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
89 ;; '(ascii (nil korean-ksc5601) nil nil
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
90 ;; nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
91 ;; designation-bol))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
92
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
93 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
94 'iso-2022-kr 'iso2022
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
95 "Coding-System used for communication with mail in Korea."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
96 '(charset-g0 ascii
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
97 charset-g1 korean-ksc5601
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
98 force-g1-on-output t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
99 seven t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
100 lock-shift t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
101 mnemonic "Ko/7bit"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
102 eol-type lf))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
103
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
104 (defun setup-korean-environment ()
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
105 "Setup multilingual environment (MULE) for Korean."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
106 (interactive)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
107 (setup-english-environment)
207
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
108 ;; (setq coding-category-iso-8-2 'euc-kr)
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
109 (set-coding-category-system 'iso-8-2 'euc-kr)
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
110
207
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
111 ;; (set-coding-priority
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
112 ;; '(coding-category-iso-7
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
113 ;; coding-category-iso-8-2
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
114 ;; coding-category-iso-8-1))
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
115 (set-coding-priority-list
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
116 '(iso-8-2
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
117 iso-7
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
118 iso-8-1
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
119 iso-8-designate
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
120 iso-lock-shift
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
121 no-conversion
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
122 shift-jis
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
123 big5))
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
124
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
125 (set-default-coding-systems 'euc-kr)
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
126
207
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
127 ;; (when (eq 'x (device-type (selected-device)))
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
128 ;; (x-use-halfwidth-roman-font 'korean-ksc5601 "ksc5636"))
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
129
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
130 ;; EGG specific setup 97.02.05 jhod
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
131 (when (featurep 'egg)
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
132 (when (not (featurep 'egg-kor))
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
133 (provide 'egg-kor)
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
134 (load "its/its-hangul")
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
135 (setq its:*standard-modes*
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
136 (cons (its:get-mode-map "hangul") its:*standard-modes*)))
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
137 (setq-default its:*current-map* (its:get-mode-map "hangul")))
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 197
diff changeset
138
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
139 (setq default-input-method "korean-hangul"))
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
140
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
141 (set-language-info-alist
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
142 "Korean" '((setup-function . setup-korean-environment)
209
41ff10fd062f Import from CVS: tag r20-4b3
cvs
parents: 207
diff changeset
143 (tutorial . "TUTORIAL.ko")
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
144 (charset . (korean-ksc5601))
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
145 (coding-system . (iso-2022-kr euc-kr))
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
146 (sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B")
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
147 (documentation . t)))
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
148
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
149 ;;; korean.el ends here