Windows7でNTEmacsの設定をしました
基本的にC/C++用
NTEmacsのダウンロード
http://cha.la.coocan.jp/files/emacs-23.3.zip
からバイナリをいただく
c:\emacsに展開
Cygwinのダウンロード
http://www.cygwin.com/
このとき、gccとかzshとか必要なものもとりあえずインストールしてくらさい。
あと、opensslが必要なのでこれもダウンロードしてください。
c:\cygwinに展開
auto-install.elをダウンロード
http://www.emacswiki.org/emacs/download/auto-install.el
からc:\cygwin\home\Username\.emacs.d\site-lisp\にダウンロード
c:\cygwin\home\Username\.emacsに以下を記述
(add-to-list 'load-path "~/.emacs.d/site-lisp/") (require 'auto-install) (setq auto-install-directory "~/.emacs.d/site-lisp/") ||< でM-x eval-bufferして.emacsの内容を反映させる ** emacsからcygwinを呼べるようにする (let* ((cygwin-root "c:/cygwin") (cygwin-bin (concat cygwin-root "/bin"))) (when (and (eq 'windows-nt system-type) (file-readable-p cygwin-root)) (setq exec-path (cons cygwin-bin exec-path)) (setenv "PATH" (concat cygwin-bin ";" (getenv "PATH"))) ;; By default use the Windows HOME. ;; Otherwise, uncomment below to set a HOME (setenv "HOME" (concat cygwin-root "/home/Username")) ;; NT-emacs assumes a Windows shell. Change to bash. (setq shell-file-name "bash") (setenv "SHELL" shell-file-name) (setq explicit-shell-file-name shell-file-name) ;; This removes unsightly ^M characters that would otherwise ;; appear in the output of java applications. (add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m))) ただ、M-x shellしたときになんか変な文字列が常に表示されちゃうのでこれはなんとかして直したい ** cygwin-mount.el M-x auto-install-from-emacswiki cygwin-mount.el >|| (require 'cygwin-mount) (cygwin-mount-activate)
anything と auto-completeをインストール
M-x auto-install-batch anythingと
M-x auto-install-batch auto-complete development version
c-eldoc.el導入
M-x auto-install-from-emacswiki c-eldoc.el
(setq c-eldoc-cpp-command "/bin/cpp ") (load "c-eldoc") (setq c-eldoc-includes "-I./ -I../ ") (add-hook 'c-mode-hook 'c-turn-on-eldoc-mode) (add-hook 'c++-mode-hook (lambda () (set (make-local-variable 'eldoc-idle-delay) 0.20) (c-turn-on-eldoc-mode)))
とりあえず今日はここまで