comparison lisp/language/english.el @ 197:acd284d43ca1 r20-3b25

Import from CVS: tag r20-3b25
author cvs
date Mon, 13 Aug 2007 10:00:02 +0200
parents 929b76928fce
children e45d5e7c476e
comparison
equal deleted inserted replaced
196:58e0786448ca 197:acd284d43ca1
1 ;;; english.el --- English support 1 ;;; english.el --- English support
2 2
3 ;; Copyright (C) 1997 Free Software Foundation, Inc.
4 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
5 6
6 ;; Keywords: multibyte character, character set, syntax, category 7 ;; Keywords: multibyte character, character set, syntax, category
7 8
8 ;; This file is part of GNU Emacs. 9 ;; This file is part of XEmacs.
9 10
10 ;; GNU Emacs is free software; you can redistribute it and/or modify 11 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; it under the terms of the GNU General Public License as published by 12 ;; 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 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version. 14 ;; any later version.
14 15
15 ;; GNU Emacs is distributed in the hope that it will be useful, 16 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; GNU General Public License for more details. 19 ;; General Public License for more details.
19 20
20 ;; You should have received a copy of the GNU General Public License 21 ;; 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 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 ;; Boston, MA 02111-1307, USA. 24 ;; 02111-1307, USA.
24 25
25 ;;; Commentary: 26 ;;; Commentary:
26 27
27 ;; We need nothing special to support English on Emacs. Selecting 28 ;; We need nothing special to support English on Emacs. Selecting
28 ;; English as a language environment is one of the ways to reset 29 ;; English as a language environment is one of the ways to reset
29 ;; various multilingual environment to the original settting. 30 ;; various multilingual environment to the original settting.
31
32 ;; modified for XEmacs by MORIOKA Tomohiko
30 33
31 ;;; Code 34 ;;; Code
32 35
33 (defun setup-english-environment () 36 (defun setup-english-environment ()
34 "Reset multilingual environment of Emacs to the default status. 37 "Reset multilingual environment of Emacs to the default status.
35 The default status is as follows. 38 The default status is as follows.
36 39
37 The default value of enable-multibyte-characters is t. 40 The default value of enable-multibyte-characters is t.
38 41
39 The default value of buffer-file-coding-system is iso-8859-1. 42 The default value of buffer-file-coding-system is nil.
40 The coding system for terminal output is nil. 43 The coding system for terminal output is nil.
41 The coding system for keyboard input is nil. 44 The coding system for keyboard input is nil.
42 45
43 The order of priorities of coding categories and the coding system 46 The order of priorities of coding categories and the coding system
44 bound to each category are as follows 47 bound to each category are as follows
45 coding category coding system 48 coding category coding system
46 -------------------------------------------------- 49 --------------------------------------------------
47 coding-category-iso-7 iso-2022-7 50 coding-category-iso-7 iso-2022-7bit
51 coding-category-iso-8-1 iso-8859-1
48 coding-category-iso-8-2 iso-8859-1 52 coding-category-iso-8-2 iso-8859-1
49 coding-category-iso-8-1 iso-8859-1 53 coding-category-iso-7-else iso-2022-7bit-lock
50 coding-category-iso-else iso-8859-1 54 coding-category-iso-8-else iso-2022-8bit-ss2
51 coding-category-internal internal 55 coding-category-emacs-mule no-conversion
52 coding-category-binary no-conversion 56 coding-category-sjis japanese-shift-jis
53 coding-category-sjis sjis 57 coding-category-big5 chinese-big5
54 coding-category-big5 big5 58 coding-category-binarry no-conversion
55 " 59 "
56 (interactive) 60 (interactive)
57 (setq-default enable-multibyte-characters t) 61 (setq-default enable-multibyte-characters t)
58 (if (local-variable-p 'enable-multibyte-characters)
59 (setq enable-multibyte-characters t))
60 62
61 (setq coding-category-internal 'internal 63 (setq coding-category-iso-7 'iso-2022-7bit
62 coding-category-iso-7 'iso-2022-7
63 coding-category-iso-8-1 'iso-8859-1 64 coding-category-iso-8-1 'iso-8859-1
64 coding-category-iso-8-2 'iso-8859-1 65 coding-category-iso-8-2 'iso-8859-1
65 coding-category-iso-else 'iso-8859-1 66 coding-category-iso-7-else 'iso-2022-7bit-lock
66 coding-category-sjis 'sjis 67 coding-category-iso-8-else 'iso-2022-8bit-ss2
67 coding-category-big5 'big5 68 coding-category-emacs-mule 'no-conversion
68 coding-category-binary 'no-conversion) 69 coding-category-sjis 'japanese-shift-jis
70 coding-category-big5 'chinese-big5
71 coding-category-binary 'binary)
69 72
70 (set-coding-priority 73 (set-coding-priority
71 '(coding-category-iso-7 74 '(coding-category-iso-7
72 coding-category-iso-8-2 75 coding-category-iso-8-2
73 coding-category-iso-8-1 76 coding-category-iso-8-1
74 coding-category-iso-else 77 coding-category-iso-7-else
75 coding-category-internal 78 coding-category-iso-8-else
76 coding-category-binary 79 coding-category-emacs-mule
80 coding-category-raw-text
77 coding-category-sjis 81 coding-category-sjis
78 coding-category-big5)) 82 coding-category-big5
83 coding-category-binary))
79 84
80 (setq-default buffer-file-coding-system 'iso-8859-1) 85 (set-default-coding-systems nil)
81 (set-terminal-coding-system nil) 86 ;; Don't alter the terminal and keyboard coding systems here.
82 (set-keyboard-coding-system nil) 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)
83 91
84 (setq sendmail-coding-system nil 92 (setq nonascii-insert-offset 0))
85 rmail-file-coding-system nil)
86 )
87
88 (defun describe-english-support ()
89 "Describe how Emacs support English."
90 (interactive)
91 (describe-language-support-internal "English"))
92 93
93 (set-language-info-alist 94 (set-language-info-alist
94 "English" '((setup-function . setup-english-environment) 95 "English" '((setup-function . setup-english-environment)
95 (describe-function . describe-english-support)
96 (tutorial . "TUTORIAL") 96 (tutorial . "TUTORIAL")
97 (charset . (ascii)) 97 (charset . (ascii))
98 (sample-text . "Hello!, Hi!, How are you?") 98 (sample-text . "Hello!, Hi!, How are you?")
99 (documentation . "\ 99 (documentation . "\
100 There's nothing special you should care to handle English in Emacs. 100 Nothing special is needed to handle English.")
101 You can use English both with enable-multibyte-characters t and nil.")
102 )) 101 ))
103 102
104 (register-input-method "English" 103 ;; Make "ASCII" an alias of "English" language environment.
105 '("quail-dvorak" quail-use-package "quail/latin")) 104 (set-language-info-alist
106 (register-input-method "British" 105 "ASCII" (cdr (assoc "English" language-info-alist)))
107 '("quail-british" quail-use-package "quail/latin"))
108 106
109 ;;; english.el ends here 107 ;;; english.el ends here