70
|
1 ;; Mule default configuration file
|
|
2
|
|
3 ;; This file is part of XEmacs.
|
|
4
|
|
5 ;; XEmacs is free software; you can redistribute it and/or modify it
|
|
6 ;; under the terms of the GNU General Public License as published by
|
|
7 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
8 ;; any later version.
|
|
9
|
|
10 ;; XEmacs is distributed in the hope that it will be useful, but
|
|
11 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
13 ;; General Public License for more details.
|
|
14
|
|
15 ;; You should have received a copy of the GNU General Public License
|
|
16 ;; along with XEmacs; see the file COPYING. If not, write to the
|
|
17 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
18 ;; Boston, MA 02111-1307, USA.
|
|
19
|
|
20 ;;; 87.6.9 created by K.handa
|
|
21 ;;; (Note: following comment obsolete -- mrb)
|
|
22
|
|
23 ;;; IMPORTANT NOTICE -- DON'T EDIT THIS FILE!!!
|
|
24 ;;; Keep this file unmodified for further patches being applied successfully.
|
|
25 ;;; All language specific basic environments are defined here.
|
|
26 ;;; By default, Japanese is set as the primary environment.
|
|
27 ;;; You can change primary environment in `./lisp/site-init.el by
|
|
28 ;;; `set-primary-environment'. For instance,
|
|
29 ;;; (set-primary-environment 'chinese)
|
|
30 ;;; makes Chinese the primary environment.
|
|
31 ;;; If you are still not satisfied with the settings, you can
|
|
32 ;;; override them after the above line. For instance,
|
110
|
33 ;;; (set-default-buffer-file-coding-system 'big5)
|
70
|
34 ;;; makes big5 be used for file I/O by default.
|
|
35 ;;; If you are not satisfied with other default settings in this file,
|
|
36 ;;; override any of them also in `./lisp/site-init.el'. For instance,
|
|
37 ;;; (define-program-coding-system nil ".*mail.*" 'iso-8859-1)
|
|
38 ;;; makes the coding-system 'iso-8859-1 be used in mail.
|
|
39
|
|
40
|
|
41 ;;;; GLOBAL ENVIRONMENT SETUP
|
|
42 (require 'cl)
|
|
43
|
|
44
|
207
|
45 ;; (setq language-environment-list
|
|
46 ;; (sort (language-environment-list) 'string-lessp))
|
70
|
47
|
159
|
48 ;; MULE keymap codes were moved to mule-cmds.el.
|
70
|
49
|
|
50 ;; Alternative key definitions
|
|
51 ;; Original mapping will be altered by set-keyboard-coding-system.
|
|
52 (define-key global-map [(meta \#)] 'ispell-word) ;originally "$"
|
|
53 ;; (define-key global-map [(meta {)] 'insert-parentheses) ;originally "("
|
|
54
|
|
55 ;; Following line isn't mule-specific --mrb
|
|
56 ;;(setq-default modeline-buffer-identification '("XEmacs: %17b"))
|
|
57
|
|
58 (defconst modeline-multibyte-status '("%C")
|
|
59 "Modeline control for showing multibyte extension status.")
|
|
60
|
|
61 ;; override the default value defined in loaddefs.el.
|
|
62 (setq-default modeline-format
|
|
63 (cons (purecopy "")
|
|
64 (cons 'modeline-multibyte-status
|
|
65 (cdr modeline-format))))
|
|
66
|
159
|
67 ;; MULE keymap codes were moved to mule-cmds.el.
|
70
|
68
|
209
|
69 ;; (define-key help-map "T" 'help-with-tutorial-for-mule)
|
70
|
70
|
209
|
71 ;; (defvar help-with-tutorial-language-alist
|
|
72 ;; '(("Japanese" . ".jp")
|
|
73 ;; ("Korean" . ".kr")
|
|
74 ;; ("Thai" . ".th")))
|
70
|
75
|
209
|
76 ;(defun help-with-tutorial-for-mule (language)
|
|
77 ; "Select the Mule learn-by-doing tutorial."
|
|
78 ; (interactive (list (let ((completion-ignore-case t)
|
|
79 ; lang)
|
|
80 ; (completing-read
|
|
81 ; "Language: "
|
|
82 ; help-with-tutorial-language-alist))))
|
|
83 ; (setq language (cdr (assoc language help-with-tutorial-language-alist)))
|
|
84 ; (help-with-tutorial (concat "mule/TUTORIAL" (or language ""))))
|
70
|
85
|
|
86 (defvar auto-language-alist
|
207
|
87 '(("^ja" . "Japanese")
|
|
88 ("^zh" . "Chinese")
|
|
89 ("^ko" . "Korean"))
|
70
|
90 "Alist of LANG patterns vs. corresponding language environment.
|
|
91 Each element looks like (REGEXP . LANGUAGE-ENVIRONMENT).
|
|
92 It the value of the environment variable LANG matches the regexp REGEXP,
|
|
93 then `set-language-environment' is called with LANGUAGE-ENVIRONMENT.")
|
207
|
94
|
70
|
95 (defun init-mule ()
|
|
96 "Initialize MULE environment at startup. Don't call this."
|
|
97 (let ((lang (or (getenv "LC_ALL") (getenv "LC_MESSAGES") (getenv "LANG"))))
|
|
98 (unless (or (null lang) (string-equal "C" lang))
|
|
99 (let ((case-fold-search t))
|
207
|
100 (loop for elt in auto-language-alist
|
|
101 if (string-match (car elt) lang)
|
|
102 return (progn
|
|
103 (setq lang (substring lang 0 (match-end 0)))
|
|
104 (set-language-environment (cdr elt))
|
|
105 )))
|
70
|
106 ;; Load a (localizable) locale-specific init file, if it exists.
|
|
107 (load (format "locale/%s/locale-start" lang) t t)))
|
207
|
108
|
|
109 (when current-language-environment
|
197
|
110 ;; Translate remaining args on command line using file-name-coding-system
|
70
|
111 (loop for arg in-ref command-line-args-left do
|
197
|
112 (setf arg (decode-coding-string arg file-name-coding-system)))
|
207
|
113
|
82
|
114 ;; rman seems to be incompatible with encoded text
|
|
115 (setq Manual-use-rosetta-man nil)
|
207
|
116
|
70
|
117 ;; Make sure ls -l output is readable by dired and encoded using
|
197
|
118 ;; file-name-coding-system
|
70
|
119 (add-hook
|
|
120 'dired-mode-hook
|
|
121 (lambda ()
|
|
122 (make-local-variable 'process-environment)
|
|
123 (setenv "LC_MESSAGES" "C")
|
|
124 (setenv "LC_TIME" "C"))))
|
207
|
125
|
197
|
126 ;; Register avairable input methods by loading LEIM list file.
|
|
127 (load "leim-list.el" 'noerror 'nomessage 'nosuffix)
|
70
|
128 )
|
|
129
|
|
130 (add-hook 'before-init-hook 'init-mule)
|
|
131
|
|
132 ;;;;; Enable the tm package by default
|
|
133 ;;(defun init-mule-tm ()
|
|
134 ;; "Load MIME (TM) support for GNUS, VM, MH-E, and RMAIL."
|
|
135 ;; (load "mime-setup"))
|
|
136
|
|
137 ;;(add-hook 'after-init-hook 'init-mule-tm)
|
|
138
|
|
139 ;;; mule-init.el ends here
|