70
|
1 ;;; korean-hooks.el --- pre-loaded support for Korean.
|
|
2
|
|
3 ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
|
|
4 ;; Copyright (C) 1995 Amdahl Corporation.
|
|
5 ;; Copyright (C) 1995 Sun Microsystems.
|
|
6
|
|
7 ;; This file is part of XEmacs.
|
|
8
|
|
9 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
10 ;; under the terms of the GNU General Public License as published by
|
|
11 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
12 ;; any later version.
|
|
13
|
|
14 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
15 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
17 ;; General Public License for more details.
|
|
18
|
|
19 ;; You should have received a copy of the GNU General Public License
|
|
20 ;; along with XEmacs; see the file COPYING. If not, write to the
|
|
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
22 ;; Boston, MA 02111-1307, USA.
|
|
23
|
|
24 ;;; Synched up with: Mule 2.3.
|
|
25
|
|
26
|
|
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
28 ;;; KOREAN
|
|
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
30
|
|
31 ;; Syntax of Korean characters.
|
|
32 (loop for row from 33 to 34 do (modify-syntax-entry `[korean-ksc5601 ,row] "."))
|
|
33 (loop for row from 35 to 37 do (modify-syntax-entry `[korean-ksc5601 ,row] "w"))
|
|
34 (loop for row from 38 to 41 do (modify-syntax-entry `[korean-ksc5601 ,row] "."))
|
|
35 (loop for row from 42 to 126 do (modify-syntax-entry `[korean-ksc5601 ,row] "w"))
|
|
36
|
|
37 ;; EGG specific setup
|
|
38 ;(if (featurep 'egg)
|
|
39 ; (progn
|
|
40 ; (load "its-hangul")
|
|
41 ; (setq its:*standard-modes*
|
|
42 ; (cons (its:get-mode-map "hangul") its:*standard-modes*))
|
|
43 ; (setq-default its:*current-map* (its:get-mode-map "hangul"))))
|
|
44
|
88
|
45 ;(add-hook 'quail-package-alist '("hangul" "quail/hangul"))
|
|
46 ;(add-hook 'quail-package-alist '("hangul3" "quail/hangul3"))
|
|
47 ;(add-hook 'quail-package-alist '("hanja-jis" "quail/hanja-jis"))
|
|
48 ;(add-hook 'quail-package-alist '("hanja-ksc" "quail/hanja-ksc"))
|
70
|
49
|
|
50 (make-coding-system
|
|
51 'euc-korea 'iso2022
|
|
52 "Coding-system of Korean EUC (Extended Unix Code)."
|
|
53 '(charset-g0 ascii
|
|
54 charset-g1 korean-ksc5601
|
88
|
55 mnemonic "EUC/Ko"
|
70
|
56 eol-type lf
|
|
57 ))
|
|
58
|
|
59 (copy-coding-system 'euc-korea 'euc-kr)
|
|
60
|
|
61 (make-coding-system
|
|
62 'iso-2022-kr 'iso2022
|
|
63 "Coding-System used for communication with mail in Korea."
|
|
64 '(charset-g0 ascii
|
|
65 charset-g1 korean-ksc5601
|
|
66 force-g1-on-output t
|
|
67 seven t
|
|
68 lock-shift t
|
88
|
69 mnemonic "Mail/Ko"
|
70
|
70 eol-type lf
|
|
71 ))
|
|
72
|
|
73 (copy-coding-system 'iso-2022-kr 'korean-mail)
|
|
74
|
|
75 (make-coding-system
|
|
76 'iso-2022-int-1 'iso2022
|
|
77 "ISO-2022-INT-1"
|
|
78 '(charset-g0 ascii
|
|
79 charset-g1 korean-ksc5601
|
|
80 short t
|
|
81 seven t
|
|
82 lock-shift t
|
88
|
83 mnemonic "ISO7/Ko"
|
70
|
84 ))
|
|
85
|
|
86 (define-language-environment 'korean
|
|
87 "Korean"
|
|
88 (lambda ()
|
|
89 (set-coding-category-system 'iso-8-2 'euc-korea)
|
88
|
90 (set-coding-priority-list '(iso-8-2 iso-7 iso-8-designate))
|
|
91 (set-pathname-coding-system 'euc-korea)
|
|
92 (add-hook 'comint-exec-hook
|
|
93 (lambda ()
|
|
94 (let ((proc (get-buffer-process (current-buffer))))
|
|
95 (set-process-input-coding-system proc 'euc-korea)
|
|
96 (set-process-output-coding-system proc 'euc-korea))))
|
|
97 (set-file-coding-system-for-read 'autodetect)
|
|
98 (set-default-file-coding-system 'euc-korea)
|
|
99 (setq keyboard-coding-system 'euc-korea)
|
|
100 (setq terminal-coding-system 'euc-korea)
|
98
|
101 (set-charset-registry 'ascii "ksc5636")
|
|
102
|
|
103 ;; EGG specific setup 97.02.05 jhod
|
|
104 (when (featurep 'egg)
|
|
105 (when (not (featurep 'egg-kor))
|
|
106 (provide 'egg-kor)
|
|
107 (load "its/its-hangul")
|
|
108 (setq its:*standard-modes*
|
|
109 (cons (its:get-mode-map "hangul") its:*standard-modes*)))
|
|
110 (setq-default its:*current-map* (its:get-mode-map "hangul")))
|
|
111
|
88
|
112 ; (setq-default quail-current-package
|
|
113 ; (assoc "hangul" quail-package-alist))))
|
98
|
114 ))
|