Open knxm opened 11 years ago
We made a config/hooks/emacs.chroot for this issue.
Finally, we determined to configure in lang/ja script, because when we build chroot, always LANG=C, we can not use case statement.
Can we reopen this issue?
I've noticed that some old settings in the egg age still remain. The following lines can be removed because we are using mozc:
(setq its-hira-comma ",")
(setq its-hira-period ".")
(eval-after-load "its"
'(define-its-state-machine-append its-hira-map
(its-defrule "dhi" "でぃ")
(its-defrule "dhu" "でゅ")
(its-defrule "thi" "てぃ")
(its-defrule "thu" "てゅ")
(its-defrule "whi" "うぃ")
(its-defrule "whe" "うぇ")
(its-defrule "who" "うぉ")))
(toggle-input-method nil)
(setq its-enable-fullwidth-alphabet nil)
Futher, we don't need
(set-language-environment 'utf-8)
(prefer-coding-system 'utf-8)
which are automatically set from the locale. ( http://masutaka.net/chalow/2009-07-09-1.html )
So, the settings we do need is only mozc related things (except for the comma and the period conversion rules). I'd like to propose to prepare a "language-independent" initialization file like:
;;
;; /etc/emacs/site-start.d/90lang.el
;; mathlibre language settings (input methods etc.)
;;
(let ((lang (getenv "LANG")))
(cond ((or (equal lang "ja_JP.UTF-8")
(equal lang "ja_JP.EUC-JP"))
(when (file-readable-p "/usr/share/emacs/site-lisp/emacs-mozc/mozc.el")
(require 'mozc)
(setq default-input-method "japanese-mozc")))
(t nil)))
With this init file, it's now easy to add default input methods for other languages. We can also include other language-specific settings here (yatex etc.).
Thank you very much, I added the new file: config/include.chroot/etc/emacs/site-start.d/90lang.el .
Which is the best way of setting the language environment of emacs. I want to choose language environments in Makefile with "lb config".