NTEmacs 23 に乗り換える(途中)

前々から気になりつつも、面倒&特に利点無しだったので放置していたのですが、flymakeを使ったらMeadowが頻繁に落ちるので、ついにNTEmacs23への乗り換えを決意しました。

ということで、とりあえずメモ。なお、インストール等は Cygwin 1.7 の bash 上で作業しています。

NTEmacs 23 バイナリの入手

http://gnupack.sourceforge.jp/docs/current/UsersGuide.html

NTEmacsを C:\opt\emacs 以下に展開。

hiwin-mode

gnupackから直接抽出 → site-lisp/hiwin-mode

tabbar

gnupackから直接抽出 → site-lisp/tabbar

APEL

http://www.jpl.org/elips/apel/

make EMACS=/opt/emacs/bin/emacs install

LIMIT (FLIM)

http://www.jpl.org/ftp/pub/m17n/

make EMACS=/opt/emacs/bin/emacs install

SEMI

http://www.jpl.org/ftp/pub/m17n/

make EMACS=/opt/emacs/bin/emacs install

SKK

http://openlab.ring.gr.jp/skk/index-j.html

SHELL=`cygpath -am $SHELL` make EMACS=/opt/emacs/bin/emacs install

Wanderlust

http://www.jpl.org/elips/wl/snapshots/

make EMACS=/opt/emacs/bin/emacs install

WindowsISO-2022-JP対応

http://nijino.homelinux.net/emacs/cp5022x.el

cd /opt/emacs/site-lisp
wget http://nijino.homelinux.net/emacs/cp5022x.el

フォント設定

http://www11.plala.or.jp/metameta/takuayu_papa/emacs2.html
⇒ えせBDF Fontにしよう!(new)

文字コード設定

http://nijino.homelinux.net/emacs/emacs23-ja.html

上記だけではまだ問題が出たので、若干改変

@@ -1,5 +1,15 @@
--- orig.el	2010-08-06 00:08:30.312500000 +0900
+++ new.el	2010-08-06 00:10:14.531250000 +0900
@@ -1,5 +1,15 @@
 (cond
  ((not (string< mule-version "6.0"))
+  ;; 機種依存文字
+  (require 'cp5022x)
+  (define-coding-system-alias 'euc-jp 'cp51932)
+  ;; decode-translation-table の設定
+  (coding-system-put 'euc-jp :decode-translation-table
+		     (get 'japanese-ucs-jis-to-cp932-map 'translation-table))
+  (coding-system-put 'iso-2022-jp :decode-translation-table
+		     (get 'japanese-ucs-jis-to-cp932-map 'translation-table))
+  (coding-system-put 'utf-8 :decode-translation-table
+		     (get 'japanese-ucs-jis-to-cp932-map 'translation-table))
   ;; encode-translation-table の設定
   (coding-system-put 'euc-jp :encode-translation-table
 		     (get 'japanese-ucs-cp932-to-jis-map 'translation-table))
@@ -7,6 +17,8 @@
 		     (get 'japanese-ucs-cp932-to-jis-map 'translation-table))
   (coding-system-put 'cp932 :encode-translation-table
 		     (get 'japanese-ucs-jis-to-cp932-map 'translation-table))
+  (coding-system-put 'utf-8 :encode-translation-table
+		     (get 'japanese-ucs-jis-to-cp932-map 'translation-table))
   ;; charset と coding-system の優先度設定
   (set-charset-priority 'ascii 'japanese-jisx0208 'latin-jisx0201
 			'katakana-jisx0201 'iso-8859-1 'cp1252 'unicode)
@@ -18,8 +30,6 @@
 	 (get 'japanese-ucs-jis-to-cp932-map 'translation-table)
 	 (coding-system-plist 'utf-8))
   (set-terminal-coding-system 'utf-8-for-putty)
-  ;; 機種依存文字
-  (require 'cp5022x)
   ;; East Asian Ambiguous
   (defun set-east-asian-ambiguous-width (width)
     (while (char-table-parent char-width-table)