159
|
1 ;;; english.el --- English support
|
|
2
|
|
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
|
197
|
4 ;; Licensed to the Free Software Foundation.
|
|
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
|
159
|
6
|
|
7 ;; Keywords: multibyte character, character set, syntax, category
|
|
8
|
197
|
9 ;; This file is part of XEmacs.
|
159
|
10
|
197
|
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
|
159
|
13 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
14 ;; any later version.
|
|
15
|
197
|
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.
|
159
|
20
|
|
21 ;; You should have received a copy of the GNU General Public License
|
197
|
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.
|
159
|
25
|
|
26 ;;; Commentary:
|
|
27
|
|
28 ;; We need nothing special to support English on Emacs. Selecting
|
|
29 ;; English as a language environment is one of the ways to reset
|
|
30 ;; various multilingual environment to the original settting.
|
|
31
|
197
|
32 ;; modified for XEmacs by MORIOKA Tomohiko
|
|
33
|
159
|
34 ;;; Code
|
|
35
|
|
36 (defun setup-english-environment ()
|
|
37 "Reset multilingual environment of Emacs to the default status.
|
|
38 The default status is as follows.
|
|
39
|
|
40 The default value of enable-multibyte-characters is t.
|
|
41
|
197
|
42 The default value of buffer-file-coding-system is nil.
|
159
|
43 The coding system for terminal output is nil.
|
|
44 The coding system for keyboard input is nil.
|
|
45
|
|
46 The order of priorities of coding categories and the coding system
|
|
47 bound to each category are as follows
|
|
48 coding category coding system
|
|
49 --------------------------------------------------
|
197
|
50 coding-category-iso-7 iso-2022-7bit
|
159
|
51 coding-category-iso-8-1 iso-8859-1
|
197
|
52 coding-category-iso-8-2 iso-8859-1
|
|
53 coding-category-iso-7-else iso-2022-7bit-lock
|
|
54 coding-category-iso-8-else iso-2022-8bit-ss2
|
|
55 coding-category-emacs-mule no-conversion
|
|
56 coding-category-sjis japanese-shift-jis
|
|
57 coding-category-big5 chinese-big5
|
|
58 coding-category-binarry no-conversion
|
159
|
59 "
|
|
60 (interactive)
|
|
61 (setq-default enable-multibyte-characters t)
|
|
62
|
197
|
63 (setq coding-category-iso-7 'iso-2022-7bit
|
159
|
64 coding-category-iso-8-1 'iso-8859-1
|
|
65 coding-category-iso-8-2 'iso-8859-1
|
197
|
66 coding-category-iso-7-else 'iso-2022-7bit-lock
|
|
67 coding-category-iso-8-else 'iso-2022-8bit-ss2
|
|
68 coding-category-emacs-mule 'no-conversion
|
|
69 coding-category-sjis 'japanese-shift-jis
|
|
70 coding-category-big5 'chinese-big5
|
|
71 coding-category-binary 'binary)
|
159
|
72
|
|
73 (set-coding-priority
|
|
74 '(coding-category-iso-7
|
|
75 coding-category-iso-8-2
|
|
76 coding-category-iso-8-1
|
197
|
77 coding-category-iso-7-else
|
|
78 coding-category-iso-8-else
|
|
79 coding-category-emacs-mule
|
|
80 coding-category-raw-text
|
159
|
81 coding-category-sjis
|
197
|
82 coding-category-big5
|
|
83 coding-category-binary))
|
159
|
84
|
197
|
85 (set-default-coding-systems nil)
|
|
86 ;; Don't alter the terminal and keyboard coding systems here.
|
|
87 ;; The terminal still supports the same coding system
|
|
88 ;; that it supported a minute ago.
|
|
89 ;;; (set-terminal-coding-system-internal nil)
|
|
90 ;;; (set-keyboard-coding-system-internal nil)
|
159
|
91
|
197
|
92 (setq nonascii-insert-offset 0))
|
159
|
93
|
|
94 (set-language-info-alist
|
|
95 "English" '((setup-function . setup-english-environment)
|
|
96 (tutorial . "TUTORIAL")
|
|
97 (charset . (ascii))
|
|
98 (sample-text . "Hello!, Hi!, How are you?")
|
|
99 (documentation . "\
|
197
|
100 Nothing special is needed to handle English.")
|
159
|
101 ))
|
|
102
|
197
|
103 ;; Make "ASCII" an alias of "English" language environment.
|
|
104 (set-language-info-alist
|
|
105 "ASCII" (cdr (assoc "English" language-info-alist)))
|
159
|
106
|
|
107 ;;; english.el ends here
|