On Nov 24, 2011, at 12:42 , Quintus wrote:

> I using Emacs for editing since a few months now and enjoy it
> mostly. However, there one thing that continues to annoy me: The
> default ruby-mode lacks some syntax highlighting and isn able to
> cope with extended symbol literals (or however these are called, see
> below). To demonstrate the problem, the following code doesn get the
> highlighting I expect:
> 
> ====================================================================
> regex  = %r<I am a Regular Expression> # Should be highlighted as
>                                       # regular expression, breaks
>                                       # indentation
> 
> symbol = %s|This is a symbol|          # Should be highlighted as a
>                                       # symbol as well
> 
> str    = %q{This is a string}          # Should be highlighted as a
>                                       # string
> 
> str    = %{This is a string}           # Should be highlighted as a
>                                       # string
> 
> ary    = %w[item1 item2 item3]         # Could be highlighted as a
>                                       # string

This seems wrong.

> symbol = :"this is a symbol"           # Should be highlighted as a
>                                       # symbol (not string), sometimes
>                                       # breaks indentation
> ====================================================================

As an unrelated aside, I'd recommend you look at align-regexp. I loves it.

> You see, I mainly talking about the percent % literals. Is there
> anything one can do about this besides digging deep into the code for
> ruby-mode?

Matz is the author/maintainer of ruby-mode.el. Report a bug on redmine.