プログラムのソースを見るならいれとくといいって
C言語のソースを読むなら何がいいすかね?
と聞いたら、教わったのでいれておく。
macportsで、いれる。
MBA-0020:~ guutara$ sudo port install global Password: ---> Computing dependencies for global ---> Fetching archive for global ---> Fetching global ---> Attempting to fetch global-5.9.3.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/global ---> Verifying checksum(s) for global ---> Extracting global ---> Configuring global ---> Building global ---> Staging global into destroot ---> Installing global @5.9.3_0 ---> Activating global @5.9.3_0 ---> Cleaning global
elを、探して、コピー。
MBA-0020:~ guutara$ find /opt/* -name gtags.el /opt/local/share/gtags/gtags.el MBA-0020:~ guutara$ cp /opt/local/share/gtags/gtags.el .emacs.d/ MBA-0020:~ guutara$ ls .emacs.d/ ac-comphist.dat auto-save-list gtags.el org ac-dict backup history org-7.5 auto-complete-config.el ensime howm popup.el auto-complete-config.elc ensime_2.8.1-0.5.0 howm-1.3.9.1 popup.elc auto-complete.el fuzzy.el init.el scala-mode auto-complete.elc fuzzy.elc init.el~
init.el に、追加。
(setq exec-path (cons "/opt/local/bin" exec-path)) (setenv "PATH" (concat '"/opt/local/bin:" (getenv "PATH"))) ;; GNU global (when (locate-library "gtags") (require 'gtags)) (global-set-key "\M-t" 'gtags-find-tag) ;関数の定義元へ (global-set-key "\M-r" 'gtags-find-rtag) ;関数の参照先へ (global-set-key "\M-s" 'gtags-find-symbol) ;変数の定義元/参照先へ (global-set-key "\M-f" 'gtags-find-file) ;ファイルにジャンプ (global-set-key "\C-t" 'gtags-pop-stack) ;前のバッファに戻る (add-hook 'c-mode-common-hook '(lambda () (gtags-mode 1) (gtags-make-complete-list)))