From: Jim Menard Date: 2004-03-14T08:59:44+09:00 Subject: Re: ruby-mode.el - font lock not working? Josh, Josh Huber writes: > Well, I can't seem to get it to work correctly. Font locking seems > to be working in all my other buffers, except for ruby buffers. > > The correct mode is set, and auto-indenting, etc is working fine. > Syntax highlighting works, but only if I run > font-lock-fontify-buffer. It seems as though the logic to color the > code works, but for some reason it doesn't happen automatically. > (and, if I modify the code after running font-lock-fontify-buffer, > the newly written code does not get colored correctly) > > I'm using this is with GNU Emacs, btw...and a pretty new > version. (from CVS) 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) )) Jim -- Jim Menard, jimm@io.com, http://www.io.com/~jimm/ "Unix is extremely user-friendly. It also happens to be extremely selective when picking its friends." -- Daniel E. Macks