Mercurial > hg > xemacs-beta
comparison lisp/mule/korean-hooks.el @ 159:3bb7ccffb0c0 r20-3b6
Import from CVS: tag r20-3b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:41:43 +0200 |
parents | 6608ceec7cf8 |
children |
comparison
equal
deleted
inserted
replaced
158:558dfa75ffb3 | 159:3bb7ccffb0c0 |
---|---|
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 (add-hook 'quail-package-alist '("hangul" "quail-hangul")) | |
38 (add-hook 'quail-package-alist '("hangul3" "quail-hangul3")) | |
39 (add-hook 'quail-package-alist '("hanja-jis" "quail-hanja-jis")) | |
40 (add-hook 'quail-package-alist '("hanja-ksc" "quail-hanja-ksc")) | |
41 | |
42 (make-coding-system | |
43 'euc-korea 'iso2022 | |
44 "Coding-system of Korean EUC (Extended Unix Code)." | |
45 '(charset-g0 ascii | |
46 charset-g1 korean-ksc5601 | |
47 mnemonic "EUC/Ko" | |
48 eol-type lf | |
49 )) | |
50 | |
51 (copy-coding-system 'euc-korea 'euc-kr) | |
52 | |
53 (make-coding-system | |
54 'iso-2022-kr 'iso2022 | |
55 "Coding-System used for communication with mail in Korea." | |
56 '(charset-g0 ascii | |
57 charset-g1 korean-ksc5601 | |
58 force-g1-on-output t | |
59 seven t | |
60 lock-shift t | |
61 mnemonic "Mail/Ko" | |
62 eol-type lf | |
63 )) | |
64 | |
65 (copy-coding-system 'iso-2022-kr 'korean-mail) | |
66 | |
67 (make-coding-system | |
68 'iso-2022-int-1 'iso2022 | |
69 "ISO-2022-INT-1" | |
70 '(charset-g0 ascii | |
71 charset-g1 korean-ksc5601 | |
72 short t | |
73 seven t | |
74 lock-shift t | |
75 mnemonic "ISO7/Ko" | |
76 )) | |
77 | |
78 ;; EGG specific setup | |
79 (define-egg-environment 'korean | |
80 "Korean settings for egg" | |
81 (lambda () | |
82 (when (not (featurep 'egg-kor)) | |
83 (load "its-hangul") | |
84 (setq its:*standard-modes* | |
85 (cons (its:get-mode-map "hangul") its:*standard-modes*)) | |
86 (provide 'egg-kor)) | |
87 (setq wnn-server-type 'kserver) | |
88 (setq egg-default-startup-file "eggrc-wnn") | |
89 (setq-default its:*current-map* (its:get-mode-map "hangul")))) | |
90 | |
91 (define-language-environment 'korean | |
92 "Korean" | |
93 (lambda () | |
94 (set-coding-category-system 'iso-8-2 'euc-korea) | |
95 (set-coding-priority-list '(iso-8-2 iso-7 iso-8-designate)) | |
96 (set-pathname-coding-system 'euc-korea) | |
97 (add-hook 'comint-exec-hook | |
98 (lambda () | |
99 (let ((proc (get-buffer-process (current-buffer)))) | |
100 (set-process-input-coding-system proc 'euc-korea) | |
101 (set-process-output-coding-system proc 'euc-korea)))) | |
102 (set-buffer-file-coding-system-for-read 'automatic-conversion) | |
103 (set-default-buffer-file-coding-system 'euc-korea) | |
104 (setq keyboard-coding-system 'euc-korea) | |
105 (setq terminal-coding-system 'euc-korea) | |
106 (when (eq 'x (device-type (selected-device))) | |
107 (x-use-halfwidth-roman-font 'korean-ksc5601 "ksc5636")) | |
108 | |
109 ;; EGG specific setup 97.02.05 jhod | |
110 (when (featurep 'egg) | |
111 (when (not (featurep 'egg-kor)) | |
112 (provide 'egg-kor) | |
113 (load "its/its-hangul") | |
114 (setq its:*standard-modes* | |
115 (cons (its:get-mode-map "hangul") its:*standard-modes*))) | |
116 (setq-default its:*current-map* (its:get-mode-map "hangul"))) | |
117 | |
118 (setq-default quail-current-package | |
119 (assoc "hangul" quail-package-alist)) | |
120 )) |