Ruby Forum Ruby-core > ruby-mode.el patch

Posted by Phil Hagelberg (Guest)
on 02.05.2008 06:14
(Received via mailing list)
Hello Rubyists.

I'm a long-time user of ruby-mode.el, which provides Ruby support for
Emacs. Recently I have started using mumamo, which is an Emacs mode for
embedding other Emacs modes inside HTML templates (a common practice
using ERB). I was having some problems with the font-lock (aka syntax
highlighting) in these buffers, and the author of mumamo advised me that
it was due to some bugs in ruby-mode.el. Specifically the fact that it
adds fontification rules in a hook was causing issues.

I have a patch attached which moves the relevant fontification rules to
the body of the ruby-mode function, but I was unable to understand why
they were in a hook to begin with. I have used this modified ruby-mode
for a few days without any problems--it also solves the mumamo problem.

I hope this patch can be applied.

I have noticed there are a number of constructs in ruby-mode.el that are
rather un-idiomatic examples of elisp, as well as some constructs that
exist to support extremely old versions of Emacs. I have been thinking
about going through and cleaning that up if that is desirable.

Also, I have heard a rumor that ruby-mode.el is to be submitted for
inclusion with Emacs. What is the status on this?

thanks,
Phil Hagelberg
http://technomancy.us
Posted by Yukihiro Matsumoto (Guest)
on 02.05.2008 08:01
(Received via mailing list)
Hi,

In message "Re: ruby-mode.el patch"
    on Fri, 2 May 2008 13:13:47 +0900, Phil Hagelberg <phil@hagelb.org> 
writes:

|I have a patch attached which moves the relevant fontification rules to
|the body of the ruby-mode function, but I was unable to understand why
|they were in a hook to begin with. I have used this modified ruby-mode
|for a few days without any problems--it also solves the mumamo problem.
|
|I hope this patch can be applied.

Done.  Thank you.

              matz.