annotate lisp/mule/english.el @ 333:4f79e16b1112 r21-0-64

Import from CVS: tag r21-0-64
author cvs
date Mon, 13 Aug 2007 10:49:50 +0200
parents
children 74fd4e045ea6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
1 ;;; english.el --- English support
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
2
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
4 ;; Licensed to the Free Software Foundation.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
6
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
7 ;; Keywords: multibyte character, character set, syntax, category
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
8
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
10
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
14 ;; any later version.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
15
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
19 ;; General Public License for more details.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
20
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
24 ;; 02111-1307, USA.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
25
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
26 ;;; Commentary:
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
27
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
28 ;; We need nothing special to support English on Emacs. Selecting
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
29 ;; English as a language environment is one of the ways to reset
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
30 ;; various multilingual environment to the original settting.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
31
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
32 ;; modified for XEmacs by MORIOKA Tomohiko
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
33
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
34 ;;; Code
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
35
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
36 (defun setup-english-environment ()
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
37 "Reset multilingual environment of Emacs to the default status.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
38 The default status is as follows.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
39
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
40 The default value of enable-multibyte-characters is t.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
41
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
42 The default value of buffer-file-coding-system is nil.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
43 The coding system for terminal output is nil.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
44 The coding system for keyboard input is nil.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
45
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
46 The order of priorities of coding categories and the coding system
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
47 bound to each category are as follows
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
48 coding category coding system
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
49 --------------------------------------------------
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
50 coding-category-iso-7 iso-2022-7bit
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
51 coding-category-iso-8-1 iso-8859-1
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
52 coding-category-iso-8-2 iso-8859-1
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
53 coding-category-iso-7-else iso-2022-7bit-lock
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
54 coding-category-iso-8-else iso-2022-8bit-ss2
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
55 coding-category-emacs-mule no-conversion
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
56 coding-category-sjis japanese-shift-jis
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
57 coding-category-big5 chinese-big5
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
58 coding-category-binarry no-conversion
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
59 "
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
60 (interactive)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
61 ;; (setq-default enable-multibyte-characters t)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
62
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
63 ;; (setq coding-category-iso-7 'iso-2022-7bit
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
64 ;; coding-category-iso-8-1 'iso-8859-1
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
65 ;; coding-category-iso-8-2 'iso-8859-1
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
66 ;; coding-category-iso-7-else 'iso-2022-7bit-lock
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
67 ;; coding-category-iso-8-else 'iso-2022-8bit-ss2
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
68 ;; coding-category-emacs-mule 'no-conversion
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
69 ;; coding-category-sjis 'japanese-shift-jis
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
70 ;; coding-category-big5 'chinese-big5
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
71 ;; coding-category-binary 'binary)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
72 (set-coding-category-system 'iso-7 'iso-2022-7bit)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
73 (set-coding-category-system 'iso-8-1 'iso-8859-1)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
74 (set-coding-category-system 'iso-8-2 'iso-8859-1)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
75 (set-coding-category-system 'iso-lock-shift 'iso-2022-lock)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
76 (set-coding-category-system 'iso-8-designate 'ctext)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
77 (set-coding-category-system 'no-conversion 'no-conversion)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
78 (set-coding-category-system 'shift-jis 'shift_jis)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
79 (set-coding-category-system 'big5 'big5)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
80
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
81 ;; (set-coding-priority
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
82 ;; '(coding-category-iso-7
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
83 ;; coding-category-iso-8-2
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
84 ;; coding-category-iso-8-1
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
85 ;; coding-category-iso-7-else
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
86 ;; coding-category-iso-8-else
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
87 ;; coding-category-emacs-mule
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
88 ;; coding-category-raw-text
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
89 ;; coding-category-sjis
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
90 ;; coding-category-big5
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
91 ;; coding-category-binary))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
92 (set-coding-priority-list
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
93 '(iso-7
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
94 iso-8-2
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
95 iso-8-1
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
96 iso-8-designate
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
97 iso-lock-shift
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
98 no-conversion
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
99 shift-jis
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
100 big5))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
101
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
102 (set-default-coding-systems nil)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
103 ;; Don't alter the terminal and keyboard coding systems here.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
104 ;; The terminal still supports the same coding system
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
105 ;; that it supported a minute ago.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
106 ;;; (set-terminal-coding-system-internal nil)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
107 ;;; (set-keyboard-coding-system-internal nil)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
108
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
109 ;;(setq nonascii-insert-offset 0)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
110 )
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
111
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
112 (set-language-info-alist
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
113 "English" '((setup-function . setup-english-environment)
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
114 (tutorial . "TUTORIAL")
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
115 (charset . (ascii))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
116 (sample-text . "Hello!, Hi!, How are you?")
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
117 (documentation . "\
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
118 Nothing special is needed to handle English.")
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
119 ))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
120
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
121 ;; Make "ASCII" an alias of "English" language environment.
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
122 (set-language-info-alist
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
123 "ASCII" (cdr (assoc "English" language-info-alist)))
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
124
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents:
diff changeset
125 ;;; english.el ends here