Mercurial > hg > xemacs-beta
comparison lisp/mule/english.el @ 392:1f50e6fe4f3f r21-2-11
Import from CVS: tag r21-2-11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:10:50 +0200 |
parents | 4f79e16b1112 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
391:e50d8e68d7a5 | 392:1f50e6fe4f3f |
---|---|
1 ;;; english.el --- English support | |
2 | |
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. | |
4 ;; Licensed to the Free Software Foundation. | |
5 ;; Copyright (C) 1997 MORIOKA Tomohiko | |
6 | |
7 ;; Keywords: multibyte character, character set, syntax, category | |
8 | |
9 ;; This file is part of XEmacs. | |
10 | |
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 | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
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. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
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. | |
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 | |
32 ;; modified for XEmacs by MORIOKA Tomohiko | |
33 | |
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 | |
42 The default value of buffer-file-coding-system is nil. | |
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 -------------------------------------------------- | |
50 coding-category-iso-7 iso-2022-7bit | |
51 coding-category-iso-8-1 iso-8859-1 | |
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 | |
59 " | |
60 (interactive) | |
61 ;; (setq-default enable-multibyte-characters t) | |
62 | |
63 ;; (setq coding-category-iso-7 'iso-2022-7bit | |
64 ;; coding-category-iso-8-1 'iso-8859-1 | |
65 ;; coding-category-iso-8-2 'iso-8859-1 | |
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) | |
72 (set-coding-category-system 'iso-7 'iso-2022-7bit) | |
73 (set-coding-category-system 'iso-8-1 'iso-8859-1) | |
74 (set-coding-category-system 'iso-8-2 'iso-8859-1) | |
75 (set-coding-category-system 'iso-lock-shift 'iso-2022-lock) | |
76 (set-coding-category-system 'iso-8-designate 'ctext) | |
77 (set-coding-category-system 'no-conversion 'no-conversion) | |
78 (set-coding-category-system 'shift-jis 'shift_jis) | |
79 (set-coding-category-system 'big5 'big5) | |
80 | |
81 ;; (set-coding-priority | |
82 ;; '(coding-category-iso-7 | |
83 ;; coding-category-iso-8-2 | |
84 ;; coding-category-iso-8-1 | |
85 ;; coding-category-iso-7-else | |
86 ;; coding-category-iso-8-else | |
87 ;; coding-category-emacs-mule | |
88 ;; coding-category-raw-text | |
89 ;; coding-category-sjis | |
90 ;; coding-category-big5 | |
91 ;; coding-category-binary)) | |
92 (set-coding-priority-list | |
93 '(iso-7 | |
94 iso-8-2 | |
95 iso-8-1 | |
96 iso-8-designate | |
97 iso-lock-shift | |
98 no-conversion | |
99 shift-jis | |
100 big5)) | |
101 | |
102 (set-default-coding-systems nil) | |
103 ;; Don't alter the terminal and keyboard coding systems here. | |
104 ;; The terminal still supports the same coding system | |
105 ;; that it supported a minute ago. | |
106 ;;; (set-terminal-coding-system-internal nil) | |
107 ;;; (set-keyboard-coding-system-internal nil) | |
108 | |
109 ;;(setq nonascii-insert-offset 0) | |
110 ) | |
111 | |
112 (set-language-info-alist | |
113 "English" '((setup-function . setup-english-environment) | |
114 (tutorial . "TUTORIAL") | |
115 (charset . (ascii)) | |
116 (sample-text . "Hello!, Hi!, How are you?") | |
117 (documentation . "\ | |
118 Nothing special is needed to handle English.") | |
119 )) | |
120 | |
121 ;; Make "ASCII" an alias of "English" language environment. | |
122 (set-language-info-alist | |
123 "ASCII" (cdr (assoc "English" language-info-alist))) | |
124 | |
125 ;;; english.el ends here |