From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: <87y564hecg.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1381203438 14204 80.91.229.3 (8 Oct 2013 03:37:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2013 03:37:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 08 05:37:21 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VTO6q-00046G-JF for ged-emacs-devel@m.gmane.org; Tue, 08 Oct 2013 05:37:20 +0200 Original-Received: from localhost ([::1]:34451 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTO6q-0007Ba-5q for ged-emacs-devel@m.gmane.org; Mon, 07 Oct 2013 23:37:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTO6h-0007BS-1S for emacs-devel@gnu.org; Mon, 07 Oct 2013 23:37:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTO6Z-0000O8-Ox for emacs-devel@gnu.org; Mon, 07 Oct 2013 23:37:10 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:19706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTO6Z-0000O3-Ko for emacs-devel@gnu.org; Mon, 07 Oct 2013 23:37:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYHCxQYDSSIHgbBLY4uglwDpHqBXoJqKQ X-IPAS-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYHCxQYDSSIHgbBLY4uglwDpHqBXoJqKQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="34993035" Original-Received: from 206-248-175-45.dsl.teksavvy.com (HELO pastel.home) ([206.248.175.45]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 07 Oct 2013 23:33:23 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id A12496049A; Mon, 7 Oct 2013 23:37:02 -0400 (EDT) In-Reply-To: <87y564hecg.fsf@yandex.ru> (Dmitry Gutov's message of "Tue, 08 Oct 2013 02:05:03 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163987 Archived-At: >> 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