1 ;; Mule default configuration file
3 ;; This file is part of XEmacs.
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)
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.
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.
20 ;;; 87.6.9 created by K.handa
21 ;;; (Note: following comment obsolete -- mrb)
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,
33 ;;; (set-default-buffer-file-coding-system 'big5)
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.
41 ;;;; GLOBAL ENVIRONMENT SETUP
45 ;; (setq language-environment-list
46 ;; (sort (language-environment-list) 'string-lessp))
48 ;; MULE keymap codes were moved to mule-cmds.el.
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 "("
55 ;; Following line isn't mule-specific --mrb
56 ;;(setq-default modeline-buffer-identification '("XEmacs: %17b"))
58 ;; MULE keymap codes were moved to mule-cmds.el.
60 ;; (define-key help-map "T" 'help-with-tutorial-for-mule)
62 ;; (defvar help-with-tutorial-language-alist
63 ;; '(("Japanese" . ".jp")
67 ;(defun help-with-tutorial-for-mule (language)
68 ; "Select the Mule learn-by-doing tutorial."
69 ; (interactive (list (let ((completion-ignore-case t)
73 ; help-with-tutorial-language-alist))))
74 ; (setq language (cdr (assoc language help-with-tutorial-language-alist)))
75 ; (help-with-tutorial (concat "mule/TUTORIAL" (or language ""))))
77 (defvar auto-language-alist
78 '(("^ja" . "Japanese")
79 ("^zh_.*.GB.*" . "Chinese-GB")
80 ("^zh_.*.BIG5.*" . "Chinese-BIG5")
82 "Alist of LANG patterns vs. corresponding language environment.
83 Each element looks like (REGEXP . LANGUAGE-ENVIRONMENT).
84 It the value of the environment variable LANG matches the regexp REGEXP,
85 then `set-language-environment' is called with LANGUAGE-ENVIRONMENT.")
88 "Initialize MULE environment at startup. Don't call this."
89 (let ((lang (or (getenv "LC_ALL") (getenv "LC_MESSAGES") (getenv "LANG"))))
90 (unless (or (null lang) (string-equal "C" lang))
91 (let ((case-fold-search t))
92 (loop for elt in auto-language-alist
93 if (string-match (car elt) lang)
95 (setq lang (substring lang 0 (match-end 0)))
96 (set-language-environment (cdr elt))
98 ;; Load a (localizable) locale-specific init file, if it exists.
99 (load (format "%s%s/locale-start"
100 (locate-data-directory "start-files")
103 (when current-language-environment
104 ;; Translate remaining args on command line using file-name-coding-system
105 (loop for arg in-ref command-line-args-left do
106 (setf arg (decode-coding-string arg file-name-coding-system)))
108 ;; rman seems to be incompatible with encoded text
109 (setq Manual-use-rosetta-man nil)
111 ;; Make sure ls -l output is readable by dired and encoded using
112 ;; file-name-coding-system
116 (make-local-variable 'process-environment)
117 (setenv "LC_MESSAGES" "C")
118 (setenv "LC_TIME" "C"))))
120 ;; Register available input methods by loading LEIM list file.
121 (load "leim-list.el" 'noerror 'nomessage 'nosuffix)
124 (add-hook 'before-init-hook 'init-mule)
126 ;;;;; Enable the tm package by default
127 ;;(defun init-mule-tm ()
128 ;; "Load MIME (TM) support for GNUS, VM, MH-E, and RMAIL."
129 ;; (load "mime-setup"))
131 ;;(add-hook 'after-init-hook 'init-mule-tm)
133 ;;; mule-init.el ends here