[HAVE_UNISTD_H]: Include unistd.h.
[emacs.git] / lisp / language / korean.el
blob5fd8b735c0f98bd91a89e561e3b05a341b878824
1 ;;; korean.el --- Support for Korean
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
6 ;; Keywords: multilingual, Korean
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
25 ;;; Commentary:
27 ;; For Korean, the character set KSC5601 is supported.
29 ;;; Code:
31 (make-coding-system
32 'korean-iso-8bit 2 ?K
33 "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)"
34 '((ascii t) korean-ksc5601 nil nil
35 nil ascii-eol ascii-cntl))
37 (define-coding-system-alias 'euc-kr 'korean-iso-8bit)
38 (define-coding-system-alias 'euc-korea 'korean-iso-8bit)
40 (make-coding-system
41 'korean-iso-7bit-lock 2 ?k
42 "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)."
43 '(ascii (nil korean-ksc5601) nil nil
44 nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil
45 designation-bol))
47 (define-coding-system-alias 'iso-2022-kr 'korean-iso-7bit-lock)
49 (defun setup-korean-environment ()
50 "Setup multilingual environment (MULE) for Korean."
51 (interactive)
52 (setup-english-environment)
53 (setq coding-category-iso-8-2 'korean-iso-8bit)
55 (set-coding-priority
56 '(coding-category-iso-7
57 coding-category-iso-8-2
58 coding-category-iso-8-1))
60 (setq-default buffer-file-coding-system 'korean-iso-8bit)
62 (setq default-input-method "korean-hangul"))
64 (set-language-info-alist
65 "Korean" '((setup-function . setup-korean-environment)
66 (tutorial . "TUTORIAL.kr")
67 (charset . (korean-ksc5601))
68 (coding-system . (korean-iso-7bit-lock korean-iso-8bit))
69 (sample-text . "Hangul (\e$(CGQ1[\e(B) \e$(C>H3gGO<<?d\e(B, \e$(C>H3gGO=J4O1n\e(B")
70 (documentation . t)))
72 ;;; korean.el ends here