Ben Giddings wrote: > On Saturday, August 16, 2003, at 09:15 AM, Andreas Schwarz wrote: >> I'm using XEmacs for Ruby editing, but it seems that I can't get the >> syntax highlighting to work. I have installed ruby-mode, but only >> comments and strings are colored. Shouldn't there be different colors >> for variables, methods, classes etc? > > Hmm, it works for me. If you can't get it working we can talk offline > about things, but yea, there are a whole lot of syntax things that are > highlighted for me. Strings, keywords, classes, constants, comments, > instance vars, #{} sequences, function definitions, regular > expressions... I found the answer in <http://www.ruby-talk.org/blade/40011>. For some reason you have to call (font-lock-fontify-buffer) to make it work, so I changed my init file like this: (setq ruby-mode-hook '(lambda () (inf-ruby-keys) (setq ruby-indent-level 2) (define-key ruby-mode-map "\r" 'ruby-reindent-then-newline-and-indent) (define-key ruby-mode-map "\C-c\C-c" 'comment-region) (font-lock-fontify-buffer) ; <-- needed to get syntax highlighting (if window-system (font-lock-mode 1)) ) ) -- AVR-Tutorial, er 350 Links Forum f AVRGCC und MSPGCC -> http://www.mikrocontroller.net