From: Guillaume Cottenceau Date: 2001-02-23T23:23:42+09:00 Subject: [ruby-talk:11379] Re: Emacs-mode? "Noel Rappin" writes: > I'd really appreciate it if somebody could give me a pointer on how to get > Emacs to recognize ruby-mode -- where to put the file, what to put in my > .emacs to get it to recognize the mode, etc.... Basically you need to have the el file distributed with ruby in emacs resource dir: /usr/share/emacs/site-lisp/ruby-mode.el And relevant info to use the ruby-mode for ruby files, in your .emacs, or in /etc/emacs/site-start.d For example, the one we provide with Linux-Mandrake in site-start.d contains: (autoload 'ruby-mode "ruby-mode" "Ruby editing mode." t) (add-to-list 'auto-mode-alist '("\.rb$" . ruby-mode)) (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) Of course, if you install Linux-Mandrake, just install packages Emacs and Ruby and it will work out of the box :-). As a side note, here's what we (mandrake ruby fans) have in our .emacs in order to evaluate current buffer whenever we do C-enter: (defmacro ilam (&rest body) `(lambda () (interactive) ,@body)) (add-hook 'ruby-mode-hook '(lambda () (local-set-key [(meta return)] (ilam (shell-command-on-region (point-min) (point-max) "ruby"))))) -- trakto http://us.mandrakesoft.com/~gc/tracto/