R
rolf.andreassen
Hi,
I'm a new user trying to set up a Ruby dev environment. I've gotten to
the point where emacs is willing to highlight some syntax, but not all.
Specifically, I get strings in grey and comments in red, but keywords
('class', 'def', 'end') stay stubbornly black, as do class and variable
names. Keywords do get highlighted in .C files, so it does not seem to
be a global emacs issue.
I wonder if the issue can be that font-lock-defaults is not getting
defined properly, for its value is nil in my test.rb file. Can anyone
help me understand how to get it properly set?
Background information: I am using GNU Emacs 21.3.1
(i386-mingw-nt5.1.2600), on Windows XP, and Ruby version 1.8.6. I am
loading ruby mode with the following lines in my .emacs:
(setq load-path (append load-path
'("D:/ruby/doc/ruby/ruby-1.8.6/misc")))
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts."
t)
(setq auto-mode-alist (cons '("\\.rb$" . ruby-mode) auto-mode-alist))
(setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
interpreter-mode-alist))
Thanks,
Rolf Andreassen.
I'm a new user trying to set up a Ruby dev environment. I've gotten to
the point where emacs is willing to highlight some syntax, but not all.
Specifically, I get strings in grey and comments in red, but keywords
('class', 'def', 'end') stay stubbornly black, as do class and variable
names. Keywords do get highlighted in .C files, so it does not seem to
be a global emacs issue.
I wonder if the issue can be that font-lock-defaults is not getting
defined properly, for its value is nil in my test.rb file. Can anyone
help me understand how to get it properly set?
Background information: I am using GNU Emacs 21.3.1
(i386-mingw-nt5.1.2600), on Windows XP, and Ruby version 1.8.6. I am
loading ruby mode with the following lines in my .emacs:
(setq load-path (append load-path
'("D:/ruby/doc/ruby/ruby-1.8.6/misc")))
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts."
t)
(setq auto-mode-alist (cons '("\\.rb$" . ruby-mode) auto-mode-alist))
(setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
interpreter-mode-alist))
Thanks,
Rolf Andreassen.