- Emacsのバージョンの確認
M-x version
GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON
M-x c-version
Using CC Mode version 5.31.7
- Wiki4D: EditorSupport/EmacsDModeから d-mode.el をダウンロード。今回は Version: 2.0.4 (February 2008)
- site-lispディレクトリにd-mode.elを置く
- .emacs.el へ次のように追記
(autoload 'd-mode "d-mode" "Major mode for editing D code." t) (add-to-list 'auto-mode-alist '("\\.d[i]?\\'" . d-mode))
- d-mode.el を使うとエラーが出るので場当たり的な対処。113〜118行目をコメントアウト。176〜178行目をコメントアウト。これで(表面的には)エラーなく使えるはず。何が起きても自己責任。
patch 当てたい方は以下の diff 使ってくださいな。
- diff
113,118c113,118 < (c-lang-defconst c-other-op-syntax-tokens < "List of the tokens made up of characters in the punctuation or < parenthesis syntax classes that have uses other than as expression < operators." < d (append '("/+" "+/" "..." ".." "!" "*" "&") < (c-lang-const c-other-op-syntax-tokens))) --- > ;;;;; (c-lang-defconst c-other-op-syntax-tokens > ;;;;; "List of the tokens made up of characters in the punctuation or > ;;;;; parenthesis syntax classes that have uses other than as expression > ;;;;; operators." > ;;;;; d (append '("/+" "+/" "..." ".." "!" "*" "&") > ;;;;; (c-lang-const c-other-op-syntax-tokens))) 176,178c176,178 < (c-lang-defconst c-typedef-decl-kwds < d (append (c-lang-const c-typedef-decl-kwds) < '("typedef" "alias"))) --- > ;;;;; (c-lang-defconst c-typedef-decl-kwds > ;;;;; d (append (c-lang-const c-typedef-decl-kwds) > ;;;;; '("typedef" "alias")))