From: Asfand Yar Qazi Date: 2004-03-14T16:34:36+09:00 Subject: Re: ruby-mode.el - font lock not working? Josh Huber wrote: > Jim Menard writes: > > >>That happens to me too, and not just in Ruby mode. I have to add a >>call to font-lock-mode to the mode hook. Here's my ruby-mode-hook: >> >>(setq ruby-mode-hook >> '(lambda () >> (setq ruby-indent-level 4) >> ; (setq indent-tabs-mode nil) ; Per advice on c.l.r >> (font-lock-mode 1) >> )) > > > This doesn't help. (in fact, I already tried it...) > global-font-lock-mode is enabled, and font-lock mode is enabled in > the ruby buffer. This appears to be some oddity specific to > ruby-mode, unfortunately. It's pretty confusing :P > (Working with the 1.8.1 version of ruby-mode.el) if you apply the following patch to the ruby-mode.el file, it may work for you (it worked for me.) *** /home/asfand/src/packages/ruby/ruby-1.8.1/misc/ruby-mode.el Fri Dec 19 17:29:09 2003 --- /home/asfand/.emacs-lisp/ruby-mode.el Sun Mar 14 07:36:51 2004 *************** *** 162,166 **** :options '(t nil space) :group 'ruby) ! (eval-when-compile (require 'cl)) (defun ruby-imenu-create-index-in-block (prefix beg end) (let ((index-alist '()) (case-fold-search nil) --- 162,169 ---- :options '(t nil space) :group 'ruby) ! (eval-when-compile ! (require 'cl) ! (require 'font-lock) ! ) (defun ruby-imenu-create-index-in-block (prefix beg end) (let ((index-alist '()) (case-fold-search nil)