From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#16811: 24.3.50; [ruby-mode] Implicit hash indentation bug Date: Thu, 20 Feb 2014 08:22:08 +0200 Message-ID: <87fvnes3qn.fsf@yandex.ru> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392877390 23728 80.91.229.3 (20 Feb 2014 06:23:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2014 06:23:10 +0000 (UTC) Cc: 16811@debbugs.gnu.org To: Bozhidar Batsov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 20 07:23:17 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WGN2S-0001Mq-TB for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Feb 2014 07:23:17 +0100 Original-Received: from localhost ([::1]:36496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGN2S-0003P6-FV for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Feb 2014 01:23:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGN2J-0003Ou-Ua for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2014 01:23:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGN2E-0000H5-7d for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2014 01:23:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGN2E-0000H0-4C for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2014 01:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WGN2D-00083O-Rc for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2014 01:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2014 06:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16811 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16811-submit@debbugs.gnu.org id=B16811.139287734730901 (code B ref 16811); Thu, 20 Feb 2014 06:23:01 +0000 Original-Received: (at 16811) by debbugs.gnu.org; 20 Feb 2014 06:22:27 +0000 Original-Received: from localhost ([127.0.0.1]:32907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGN1e-00082K-C2 for submit@debbugs.gnu.org; Thu, 20 Feb 2014 01:22:26 -0500 Original-Received: from mail-ea0-f182.google.com ([209.85.215.182]:58356) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGN1c-000827-9D for 16811@debbugs.gnu.org; Thu, 20 Feb 2014 01:22:25 -0500 Original-Received: by mail-ea0-f182.google.com with SMTP id r15so667462ead.13 for <16811@debbugs.gnu.org>; Wed, 19 Feb 2014 22:22:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=Ck+L+gOq1ldCB91kCAq3/sZyz/w3s+lPS1LAiBPBluQ=; b=WOJcig34LH1jhLJ6x796R7cCel7AckhbvOyd3hvrIME3n7nqjZaNGlfI9kAnC1zpXh V8I4JDOzy8W08a0uhXN+HqyTl9OY2n8dcuNPEsR0YIainw//be3DZ1m4ZHswh+u4s+58 mrgugEbt3MVB6B4B223CzAd8THKWOJ0zXJfTNvqSbR+HJcVRLDNai8oONyTkcvMpDnBZ MJmxw8CIdY2B5jXfaz5Gi5Oe5SlN0q6j6zx/KoS5BMjLgIoDGVOc1w1qW8nd6DGSnkNJ Lm3s5gB8HYCWItrbxfZb9j48Cwc4PLnng7/ONKemr3iHFQdnAXydg/ieC72mJ9jaEbce 0o0A== X-Received: by 10.14.108.1 with SMTP id p1mr6559681eeg.97.1392877338473; Wed, 19 Feb 2014 22:22:18 -0800 (PST) Original-Received: from axl ([93.109.195.252]) by mx.google.com with ESMTPSA id k41sm9617223een.19.2014.02.19.22.22.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 19 Feb 2014 22:22:17 -0800 (PST) In-Reply-To: (Bozhidar Batsov's message of "Wed, 19 Feb 2014 19:44:25 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85929 Archived-At: Bozhidar Batsov writes: > Should be: > > method('HashSyntax' => { > 'EnforcedStyle' => 'ruby19', > 'SupportedStyles' => %w(ruby19 hash_rockets) > }, > 'SpaceAroundOperators' => { 'Enabled' => true }) > > The fact that the hash is implicit (lacking {}) seems to mess with the > indentation logic. Not really. The corresponding example with explicit hash would be {'HashSyntax' => { 'EnforcedStyle' => 'ruby19', 'SupportedStyles' => %w(ruby19 hash_rockets) }, 'SpaceAroundOperators' => { 'Enabled' => true }} and it has the same problem. The problem seems to be that (let (smie--parent) (smie-indent--parent)) called between "=>" and "{" doesn't stop at "=>", but goes straight to the parent "{". Not sure how to fix that best with the current grammar. Stefan?