Not sure what your problem is. Here is the relevant Ruby section from my
.emacs; see if it works for you.
;;
;; Ruby-mode
;;
(autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process" t)
(autoload 'inf-ruby-keys "inf-ruby"
"Set local key defs for inf-ruby in ruby-mode")
(autoload 'ruby-mode "ruby-mode" "Ruby mode" t)
(setq auto-mode-alist (append '(("\\.rb$" . ruby-mode)
("\\.rhtml$" . ruby-mode))
auto-mode-alist))
(setq ruby-mode-hook
'(lambda ()
(inf-ruby-keys)
(setq ruby-indent-level 4)
(define-key ruby-mode-map "\r" 'ruby-reindent-then-newline-and-indent)
(define-key ruby-mode-map "\C-c\C-c" 'comment-region)
(if window-system (font-lock-mode 1))
)
)
;; RD tool mode
(autoload 'rd-mode "rd-mode" "major mode for ruby document formatter RD" t)
(add-to-list 'auto-mode-alist '("\\.rd$" . rd-mode))
Jim
--
Jim Menard, jimm / io.com, http://www.io.com/~jimm/
"I chose and my world was shaken. So what? The choice may have been
mistaken; the choosing was not. You have to move on."
-- Stephen Sondheim