From: Josh Huber Date: 2004-03-15T06:45:02+09:00 Subject: Re: ruby-mode.el - font lock not working? "Josef 'Jupp' SCHUGT" writes: > Some remarks and questions: > > What about "(add-hook 'ruby-mode-hook 'turn-on-font-lock)"? turn-on-font-lock is an XEmacs thing, not applicable to GNU Emacs... (i went looking for a similar defun, but it seems like the equivilant is (font-lock-mode 1)) > '(font-lock-mode 1)' suggests that the argument is a numerical one > while it actually is a logical one. It's only a question of style > but shouldn't one rather use '(font-lock-mode t)'? Perhaps it is with XEmacs? I've been trying out GNU Emacs, and this appears to be a difference in the API: ---- (font-lock-mode &optional ARG) Toggle Font Lock mode. With arg, turn Font Lock mode off if and only if arg is a non-positive number; if arg is nil, toggle Font Lock mode; anything else turns Font Lock on. ---- So, it seems it should be a numeric argument. > Putting '(global-font-lock-mode t)' into $HOME/.emacs may also be a > good idea. I've got (global-font-lock-mode 1) in my emacs startup file. According to the help string for g-f-l-m, it takes a numeric argument as well... > Does '(setq font-lock-maximum-decoration t)' have any effect in > ruby-mode (I don't have ruby-mode installed here so I cannot check)? This variable also doesn't seem to be used in gnu/emacs... -- Josh Huber