• Dmitry Gutov's avatar
    * lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Improve precedences · 1f923923
    Dmitry Gutov authored
    of "and", "or", "&&" and "||".
    (ruby-smie--args-separator-p): Prohibit keyword "do" as the first
    argument.  Prohibit opening curly brace because it could only be a
    block opener in that position.
    (ruby-smie--forward-token, ruby-smie--backward-token): Separate
    "|" from "&" or "*" going after it.  That can happen in block
    arguments.
    (ruby-smie--indent-to-stmt): New function, seeks the end of
    previous statement or beginning of buffer.
    (ruby-smie-rules): Use it.
    (ruby-smie-rules): Check if there's a ":" before a curly block
    opener candidate; if there is, it's a hash.
    
    * test/indent/ruby.rb: New examples.
    1f923923
ChangeLog 360 KB