I just started using `font-lock' in XEmacs, and I noticed problems
within "ruby-mode.el".  Upon searching on the net, this problem was
reported a few months ago the XEmacs "beta" group a few months ago.
The article that I found is attached below.

The XEmacs error I get (as described in the attached article) is this:

  (warning/warning) Error caught in `font-lock-pre-idle-hook':
    (malformed-list ?\')

This occurs with practically every character that I type, as long as
I'm using font-lock in ruby-mode.

Of course, a first-order fix is to disable font-lock when editing
ruby files.  But I'm looking for a better solution.

Before I go to the time and effort of subscribing to the XEmacs "beta"
group's mailing list, I'd like to check if anyone here has an upgrade
to "ruby-mode.el" which fixes this problem.

Thanks in advance for any help you could provide.

Article which describes the exact problem that I'm seeing:

> To: xemacs-beta / xemacs.org
> Subject: Re: font-lock and ruby mode
> From: Matt Tucker <tuck / whistlingfish.net>
> Date: Mon, 23 Apr 2001 23:41:41 -0700
> cc: "Triet H. Lai" <thlai / mail.usyd.edu.au>, Norbert Koch <nk / LF.net>
> In-Reply-To: <m1ofto2mxj.fsf / venus.bom.org>
> Message-ID: <536570000.988094501 / flashingchance>
>
> -- "Triet H. Lai" <thlai / mail.usyd.edu.au> spake thusly:
> > As Norbert reported in the message:
> > http://list-archive.xemacs.org/xemacs-beta/200104/msg00301.html
> > font-lock doesn't work well with ruby-mode because it uses a
> > special form of keyword in `font-lock-syntactic-keywords'
> >
> > (setq font-lock-syntactic-keywords
> >  '(("\\$\\([#\"'`$\\]\\)" 1 (1 . nil))
> >    ("\\(#\\)[{$@]" 1 (1 . nil))
> >    ("\\(/\\)\\([^/\n]\\|\\\\/\\)*\\(/\\)"
> >     (1 (7 . ?'))
> >     (3 (7 . ?')))))
> >
> > `font-lock-apply-highlight' function chokes on the last
> > keyword:
> >    ("\\(/\\)\\([^/\n]\\|\\\\/\\)*\\(/\\)"
> >     (1 (7 . ?'))
> >     (3 (7 . ?')))
> >
> > Please describe exactly what actions triggered the bug
> > and the precise symptoms of the bug:
> >
> > - open a new file, say ~/tmp/sample.rb
> > - load ruby-mode and enable it
> > - start editing ~/tmp/sample.rb: '/test/'
> >
> > As long as the second forward slash is entered XEmacs popups
> > an error message:
> >
> > "(warning/warning) Error caught in `font-lock-pre-idle-hook':
> > (malformed-list ?\')"
> >
> > However, if I disable font-lock and then enable it again,
> > problem goes away for this buffer.
>
> This one looks pretty straightforward. I'll try to find some time this
> week to look into it.

-- 
 Lloyd Zusman
 ljz / asfast.com