all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <jwvhacs4ex5.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <87y564hecg.fsf@yandex.ru> (Dmitry Gutov's message of "Tue, 08 Oct 2013 02:05:03 +0300")

>> 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



  reply	other threads:[~2013-10-08  3:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1VTAqX-0005m7-J3@vcs.savannah.gnu.org>
2013-10-07 16:55 ` [Emacs-diffs] trunk r114556: * test/indent/ruby.rb: Fix a spurious change, add more failing examples Stefan Monnier
2013-10-07 23:05   ` Dmitry Gutov
2013-10-08  3:37     ` Stefan Monnier [this message]
2013-10-09  3:27       ` Dmitry Gutov
2013-10-09 12:47         ` Stefan Monnier
2013-10-09 13:40           ` Dmitry Gutov
2013-10-09 18:24             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvhacs4ex5.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.