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

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

This seems wrong.

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

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

> You see, I=92m 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.