On 11/30/06, Jeremy Henty <jeremy / chaos.org.uk> wrote:
> Using emacs 21.4, ruby-mode.el from Ruby 1.8.5 (byte-compiled), if I
> open a file with the following code ...
>
> def foo
>   x /= y
>    bar
> end
>
> ...move the cursor to the word "bar" and press Tab, nothing happens!
> If I replace "/=" with "*=" then Tab fixes the indentation as I'd
> expect.
>
> Any suggestions for debugging this?  I've hacked elisp a few times but
> major mode definitions are beyond my experience.

The issue is probably that it's treating the "/=" as the beginning of
a multiline regexp.  A common fix for these sorts of "mistaken
delimiters" is to put a comment at the end of the line containing a
closing delimiter:

def foo
  x /= y  #/
  bar
end

Not ideal, but it might get you by.

BTW, there's a newer ruby-mode.el in the ruby CVS repository.  It
still doesn't fix this, although the behavior is slightly different
(it doesn't indent the "bar" at all, as if in a multiline string).

G.