Created
November 22, 2008 15:07
-
-
Save mag/27843 to your computer and use it in GitHub Desktop.
installing ruby-mode.el on mac osx leopard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ruby | |
;; based on http://www.rubygarden.org/Ruby/page/show/InstallingEmacsExtensions | |
;; | |
(add-to-list 'load-path "~/.emacs.d/site-lisp/ruby") | |
(autoload 'ruby-mode "ruby-mode" | |
"Mode for editing ruby source files") | |
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode)) | |
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) | |
(autoload 'run-ruby "inf-ruby" | |
"Run an inferior Ruby process") | |
(autoload 'inf-ruby-keys "inf-ruby" | |
"Set local key defs for inf-ruby in ruby-mode") | |
(add-hook 'ruby-mode-hook | |
'(lambda () | |
(inf-ruby-keys))) | |
;; If you have Emacs 19.2x or older, use rubydb2x | |
(autoload 'rubydb "rubydb3x" "Ruby debugger" t) | |
;; uncomment the next line if you want syntax highlighting | |
(add-hook 'ruby-mode-hook 'turn-on-font-lock) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is based partly on http://blog.modp.com/2007/09/ruby-mode-for-emacs.html | |
first, download the ruby mode goodness: | |
cd ~/.emacs.d | |
mkdir site-lisp # if not already there. not sure if this is the conventional place to put elisp on mac osx... | |
svn co http://svn.ruby-lang.org/repos/ruby/trunk/misc ruby | |
cd ruby | |
emacs -batch -f batch-byte-compile *.el # do not forget the -f | |
then just use the .emacs below |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment