Mercurial > hg > xemacs-beta
comparison lisp/mule/korean.el @ 333:4f79e16b1112 r21-0-64
Import from CVS: tag r21-0-64
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:49:50 +0200 |
parents | |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
332:bb75ebac9531 | 333:4f79e16b1112 |
---|---|
1 ;;; korean.el --- Support for Korean | |
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 ;; 'euc-kr 2 ?K | |
70 ;; "Coding-system of Korean EUC (Extended Unix Code)." | |
71 ;; '((ascii t) korean-ksc5601 nil nil | |
72 ;; nil ascii-eol ascii-cntl)) | |
73 | |
74 (make-coding-system | |
75 'euc-kr 'iso2022 | |
76 "Coding-system of Korean EUC (Extended Unix Code)." | |
77 '(charset-g0 ascii | |
78 charset-g1 korean-ksc5601 | |
79 mnemonic "ko/EUC" | |
80 eol-type nil)) | |
81 | |
82 ;;(define-coding-system-alias 'euc-kr 'euc-korea) | |
83 | |
84 (copy-coding-system 'euc-kr 'korean-euc) | |
85 | |
86 ;; (make-coding-system | |
87 ;; 'iso-2022-kr 2 ?k | |
88 ;; "MIME ISO-2022-KR" | |
89 ;; '(ascii (nil korean-ksc5601) nil nil | |
90 ;; nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil | |
91 ;; designation-bol)) | |
92 | |
93 (make-coding-system | |
94 'iso-2022-kr 'iso2022 | |
95 "Coding-System used for communication with mail in Korea." | |
96 '(charset-g0 ascii | |
97 charset-g1 korean-ksc5601 | |
98 force-g1-on-output t | |
99 seven t | |
100 lock-shift t | |
101 mnemonic "Ko/7bit" | |
102 eol-type lf)) | |
103 | |
104 (defun setup-korean-environment () | |
105 "Setup multilingual environment (MULE) for Korean." | |
106 (interactive) | |
107 (setup-english-environment) | |
108 ;; (setq coding-category-iso-8-2 'euc-kr) | |
109 (set-coding-category-system 'iso-8-2 'euc-kr) | |
110 | |
111 ;; (set-coding-priority | |
112 ;; '(coding-category-iso-7 | |
113 ;; coding-category-iso-8-2 | |
114 ;; coding-category-iso-8-1)) | |
115 (set-coding-priority-list | |
116 '(iso-8-2 | |
117 iso-7 | |
118 iso-8-1 | |
119 iso-8-designate | |
120 iso-lock-shift | |
121 no-conversion | |
122 shift-jis | |
123 big5)) | |
124 | |
125 (set-default-coding-systems 'euc-kr) | |
126 | |
127 ;; (when (eq 'x (device-type (selected-device))) | |
128 ;; (x-use-halfwidth-roman-font 'korean-ksc5601 "ksc5636")) | |
129 | |
130 ;; EGG specific setup 97.02.05 jhod | |
131 (when (featurep 'egg) | |
132 (when (not (featurep 'egg-kor)) | |
133 (provide 'egg-kor) | |
134 (load "its-hangul") | |
135 (setq its:*standard-modes* | |
136 (cons (its:get-mode-map "hangul") its:*standard-modes*))) | |
137 (setq-default its:*current-map* (its:get-mode-map "hangul"))) | |
138 | |
139 (setq default-input-method "korean-hangul")) | |
140 | |
141 (set-language-info-alist | |
142 "Korean" '((setup-function . setup-korean-environment) | |
143 (tutorial . "TUTORIAL.ko") | |
144 (charset . (korean-ksc5601)) | |
145 (coding-system . (iso-2022-kr euc-kr)) | |
146 (sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B") | |
147 (documentation . t))) | |
148 | |
149 ;;; korean.el ends here |