[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious c
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples. |
Date: |
Mon, 07 Oct 2013 23:37:02 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
>> This is another case where implicit-semi-p needs to be refined.
> I'm not sure I'm doing it right.
> I've tried adding
> (and (eq (car (syntax-after (1- (point)))) 2)
> (equal (save-excursion (ruby-smie--backward-token))
> "iuwu-mod"))
> as a new case in ruby-smie--implicit-semi-p, but it doesn't seem to
> have the desired (or any) effect.
When you're right after the newline that follows the "if" and you call
ruby-smie--backward-token do you then get ";" (and move to right after
the "if") or do you get "iuwu-mod" (and move to right before the "if")?
BTW, I don't guarantee that fixing ruby-smie--implicit-semi-p for this
case will give you the intended effect, but without it it'll be
difficult to get the intended effect: as it stands, SMIE considers the
newline after "if" to terminate the instruction, so the next instruction
is of course aligned with the previous one, and changing that in the
smie-rules part would invariably break other indentation cases.
Stefan
- Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples., Stefan Monnier, 2013/10/07
- Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples., Dmitry Gutov, 2013/10/07
- Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples.,
Stefan Monnier <=
- Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples., Dmitry Gutov, 2013/10/08
- Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples., Stefan Monnier, 2013/10/09
- Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples., Dmitry Gutov, 2013/10/09
- Re: [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples., Stefan Monnier, 2013/10/09