]> code.delx.au - gnu-emacs/blob - lisp/language/english.el
(setup-english-environment): Do not
[gnu-emacs] / lisp / language / english.el
1 ;;; english.el --- English support
2
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5
6 ;; Keywords: multibyte character, character set, syntax, category
7
8 ;; This file is part of GNU Emacs.
9
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.
14
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.
19
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.
24
25 ;;; Commentary:
26
27 ;; We need nothing special to support English on Emacs. Selecting
28 ;; English as a language environment is one of the ways to reset
29 ;; various multilingual environment to the original settting.
30
31 ;;; Code
32
33 (defun setup-english-environment ()
34 "Reset multilingual environment of Emacs to the default status.
35 The default status is as follows.
36
37 The default value of enable-multibyte-characters is t.
38
39 The default value of buffer-file-coding-system is nil.
40 The coding system for terminal output is nil.
41 The coding system for keyboard input is nil.
42
43 The order of priorities of coding categories and the coding system
44 bound to each category are as follows
45 coding category coding system
46 --------------------------------------------------
47 coding-category-iso-7 iso-2022-7bit
48 coding-category-iso-8-2 iso-latin-1
49 coding-category-iso-8-1 iso-latin-1
50 coding-category-iso-7-else iso-2022-7bit-lock
51 coding-category-iso-8-else iso-2022-8bit-ss2
52 coding-category-emacs-mule emacs-mule
53 coding-category-binary no-conversion
54 coding-category-sjis japanese-shift-jis
55 coding-category-big5 chinese-big5
56 "
57 (interactive)
58 (setq-default enable-multibyte-characters t)
59
60 (setq coding-category-iso-7 'iso-2022-7bit
61 coding-category-iso-8-1 'iso-latin-1
62 coding-category-iso-8-2 'iso-latin-1
63 coding-category-iso-7-else 'iso-2022-7bit-lock
64 coding-category-iso-8-else 'iso-2022-8bit-ss2
65 coding-category-emacs-mule 'emacs-mule
66 coding-category-sjis 'japanese-shift-jis
67 coding-category-big5 'chinese-big5
68 coding-category-binary 'no-conversion)
69
70 (set-coding-priority
71 '(coding-category-iso-7
72 coding-category-iso-8-2
73 coding-category-iso-8-1
74 coding-category-iso-7-else
75 coding-category-iso-8-else
76 coding-category-emacs-mule
77 coding-category-sjis
78 coding-category-big5
79 coding-category-binary))
80
81 (set-default-coding-systems nil)
82 (set-terminal-coding-system-internal nil)
83 (set-keyboard-coding-system-internal nil)
84
85 (setq nonascii-insert-offset 0))
86
87 (set-language-info-alist
88 "English" '((setup-function . setup-english-environment)
89 (tutorial . "TUTORIAL")
90 (charset . (ascii))
91 (sample-text . "Hello!, Hi!, How are you?")
92 (documentation . "\
93 Nothing special is needed to handle English.")
94 ))
95
96 ;;; english.el ends here