Emacs ruby-mode
To install ruby-mode for emacs, I followed the directions at the digital sanitation engineering blog. I pretty much did exactly the same thing-- I don't know why I wrote my own post-- I suppose it is good just for my records.
sofeng@crayola:~/etc $ export SITE_LISP=~/etc/.emacs.d/site-lisp sofeng@crayola:~/etc $ svn export http://svn.ruby-lang.org/repos/ruby/trunk/misc $SITE_LISP/ruby A /home/sofeng/etc/.emacs.d/site-lisp/ruby A /home/sofeng/etc/.emacs.d/site-lisp/ruby/rubydb2x.el A /home/sofeng/etc/.emacs.d/site-lisp/ruby/rubydb3x.el A /home/sofeng/etc/.emacs.d/site-lisp/ruby/ruby-mode.el A /home/sofeng/etc/.emacs.d/site-lisp/ruby/ruby-electric.el A /home/sofeng/etc/.emacs.d/site-lisp/ruby/inf-ruby.el A /home/sofeng/etc/.emacs.d/site-lisp/ruby/README A /home/sofeng/etc/.emacs.d/site-lisp/ruby/ruby-style.el Exported revision 18207. sofeng@crayola:~/etc $ emacs -batch -f batch-byte-complile $SITE_LISP/ruby Loading 00debian-vars... No /etc/mailname. Reverting to default... Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)... Skipping dictionaries-common setup for emacs-snapshot Loading /etc/emacs/site-start.d/50psvn.el (source)... Symbol's function definition is void: batch-byte-complile sofeng@crayola:~/etc $ ll ~/etc/.emacs.d/site-lisp/ruby total 92 -rw-r--r-- 1 sofeng sofeng 369 2008 04/10 04:36 README -rw-r--r-- 1 sofeng sofeng 14393 2008 01/06 07:49 inf-ruby.el -rw-r--r-- 1 sofeng sofeng 6747 2007 02/12 15:01 ruby-electric.el -rw-r--r-- 1 sofeng sofeng 44473 2008 07/21 17:51 ruby-mode.el -rw-r--r-- 1 sofeng sofeng 1798 2008 04/22 06:15 ruby-style.el -rw-r--r-- 1 sofeng sofeng 4481 2007 02/12 15:01 rubydb2x.el -rw-r--r-- 1 sofeng sofeng 4613 2007 02/12 15:01 rubydb3x.el
Then added the following to my .emacs:
(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)
Post a comment
About
I'm Eliot and this is my notepad for programming topics such as Python, Django, Ubuntu, Emacs, etc... more »
Search Blog
Tags
-
algorithms
(4)
-
aws
(8)
-
blogproject
(20)
-
c_cplusplus
(12)
-
cardstore
(8)
-
colinux
(2)
-
concurrency
(9)
-
conkeror
(2)
-
cygwin
(18)
-
datastructures
(15)
-
datetime
(3)
-
dell
(3)
-
django
(39)
-
emacs
(20)
-
files_directories
(10)
-
install_setup
(7)
-
javascript
(3)
-
keyboard
(6)
-
matplotlib
(5)
-
mercurial
(4)
-
nginx
(2)
-
preferences
(8)
-
processes
(3)
-
pyqt
(18)
-
python
(122)
-
ratpoison
(3)
-
regexes
(5)
-
rsync
(3)
-
softwaretools
(17)
-
sql
(13)
-
ssh
(7)
-
subversion
(6)
-
twisted
(6)
-
ubuntu
(60)
-
urxvt
(5)
-
vxworks
(25)
-
webservices
(4)
-
wmii
(7)
Blogroll
- Adam Gomaa
- Alex Clemesha
- Amir Salihefendic
- Armin Ronacher
- David Beazley
- David Ziegler
- Duncan McGreggor
- Gareth Rushgrave
- Glyph Lefkowitz
- Guido van Rossum
- Ian Bicking
- Jacob Kaplan-Moss
- James Bennett
- James Tauber
- Jesper Noehr
- Matt Harrison
- Nikolay Kolev
- Parand Darugar
- Peter Baumgartner
- Peter Bengtsson
- Rob Hudson
- Simon Willison
- Will McGugan