From: Noel Rappin Date: 2001-02-24T00:10:28+09:00 Subject: [ruby-talk:11382] Re: Emacs-mode? Thanks -- I'm using XEmacs, though (sorry for not making that clearer earlier -- my mistake), and the directory structure seems different -- it's clearly not finding the mode file -- when I open a .rb file, the mode line says "Ruby", but I'm not getting any syntax coloring or indent or anything. I appreciate the help. Noel > -----Original Message----- > From: gc@mandrakesoft.com [mailto:gc@mandrakesoft.com] > Sent: Friday, February 23, 2001 9:24 AM > To: ruby-talk ML > 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/ > >