comparison lisp/mule/korean.el @ 422:95016f13131a r21-2-19

Import from CVS: tag r21-2-19
author cvs
date Mon, 13 Aug 2007 11:25:01 +0200
parents 697ef44129c6
children
comparison
equal deleted inserted replaced
421:fff06e11db74 422:95016f13131a
1 ;;; korean.el --- Support for Korean 1 ;;; korean.el --- Support for Korean -*- coding: iso-2022-7bit; -*-
2 2
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation. 4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 1997 MORIOKA Tomohiko 5 ;; Copyright (C) 1997 MORIOKA Tomohiko
6 6
64 (setq wnn-server-type 'kserver) 64 (setq wnn-server-type 'kserver)
65 (setq egg-default-startup-file "eggrc-wnn") 65 (setq egg-default-startup-file "eggrc-wnn")
66 (setq-default its:*current-map* (its:get-mode-map "hangul")))) 66 (setq-default its:*current-map* (its:get-mode-map "hangul"))))
67 67
68 ;; (make-coding-system 68 ;; (make-coding-system
69 ;; 'euc-kr 2 ?K 69 ;; 'korean-iso-8bit 2 ?K
70 ;; "Coding-system of Korean EUC (Extended Unix Code)." 70 ;; "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)"
71 ;; '((ascii t) korean-ksc5601 nil nil 71 ;; '(ascii korean-ksc5601 nil nil
72 ;; nil ascii-eol ascii-cntl)) 72 ;; nil ascii-eol ascii-cntl)
73 ;; '((safe-charsets ascii korean-ksc5601)
74 ;; (mime-charset . euc-kr)))
73 75
74 (make-coding-system 76 (make-coding-system
75 'euc-kr 'iso2022 77 'euc-kr 'iso2022
76 "Coding-system of Korean EUC (Extended Unix Code)." 78 "Coding-system of Korean EUC (Extended Unix Code)."
77 '(charset-g0 ascii 79 '(charset-g0 ascii
79 mnemonic "ko/EUC" 81 mnemonic "ko/EUC"
80 eol-type nil)) 82 eol-type nil))
81 83
82 ;;(define-coding-system-alias 'euc-kr 'euc-korea) 84 ;;(define-coding-system-alias 'euc-kr 'euc-korea)
83 85
84 (copy-coding-system 'euc-kr 'korean-euc) 86 (define-coding-system-alias 'korean-euc 'euc-kr)
85 87
86 ;; (make-coding-system 88 ;; (make-coding-system
87 ;; 'iso-2022-kr 2 ?k 89 ;; 'iso-2022-kr 2 ?k
88 ;; "MIME ISO-2022-KR" 90 ;; "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)."
89 ;; '(ascii (nil korean-ksc5601) nil nil 91 ;; '(ascii (nil korean-ksc5601) nil nil
90 ;; nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil 92 ;; nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil
91 ;; designation-bol)) 93 ;; designation-bol)
94 ;; '((safe-charsets ascii korean-ksc5601)
95 ;; (mime-charset . iso-2022-kr)))
92 96
93 (make-coding-system 97 (make-coding-system
94 'iso-2022-kr 'iso2022 98 'iso-2022-kr 'iso2022
95 "Coding-System used for communication with mail in Korea." 99 "Coding-System used for communication with mail in Korea."
96 '(charset-g0 ascii 100 '(charset-g0 ascii
99 seven t 103 seven t
100 lock-shift t 104 lock-shift t
101 mnemonic "Ko/7bit" 105 mnemonic "Ko/7bit"
102 eol-type lf)) 106 eol-type lf))
103 107
104 (defun setup-korean-environment () 108 ;; (define-coding-system-alias 'korean-iso-7bit-lock 'iso-2022-kr)
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 109
141 (set-language-info-alist 110 (set-language-info-alist
142 "Korean" '((setup-function . setup-korean-environment) 111 "Korean" '((setup-function . setup-korean-environment-internal)
112 (exit-function . exit-korean-environment)
143 (tutorial . "TUTORIAL.ko") 113 (tutorial . "TUTORIAL.ko")
144 (charset . (korean-ksc5601)) 114 (charset korean-ksc5601)
145 (coding-system . (iso-2022-kr euc-kr)) 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)
146 (sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B") 119 (sample-text . "Hangul ($(CGQ1[(B) $(C>H3gGO<<?d(B, $(C>H3gGO=J4O1n(B")
147 (documentation . t))) 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 ))
148 126
149 ;;; korean.el ends here 127 ;;; korean.el ends here