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#16907: 24.3.50; [ruby-mode] %w/W literals have incorrect indentation Date: Sat, 01 Mar 2014 03:55:02 +0200 Message-ID: <874n3in0nd.fsf@yandex.ru> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393638975 707 80.91.229.3 (1 Mar 2014 01:56:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2014 01:56:15 +0000 (UTC) Cc: 16907@debbugs.gnu.org To: Bozhidar Batsov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 01 02:56:18 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 1WJZA1-0007du-Qt for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Mar 2014 02:56:17 +0100 Original-Received: from localhost ([::1]:53888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJZA1-0007xt-FG for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Feb 2014 20:56:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJZ9t-0007xj-95 for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2014 20:56:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJZ9n-0003xE-9m for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2014 20:56:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJZ9n-0003x9-4v for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2014 20:56:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WJZ9m-0004VQ-Ie for bug-gnu-emacs@gnu.org; Fri, 28 Feb 2014 20:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Mar 2014 01:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16907 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16907-submit@debbugs.gnu.org id=B16907.139363891717253 (code B ref 16907); Sat, 01 Mar 2014 01:56:02 +0000 Original-Received: (at 16907) by debbugs.gnu.org; 1 Mar 2014 01:55:17 +0000 Original-Received: from localhost ([127.0.0.1]:45083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJZ92-0004UC-Kq for submit@debbugs.gnu.org; Fri, 28 Feb 2014 20:55:17 -0500 Original-Received: from mail-ea0-f169.google.com ([209.85.215.169]:33481) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WJZ90-0004U2-74 for 16907@debbugs.gnu.org; Fri, 28 Feb 2014 20:55:14 -0500 Original-Received: by mail-ea0-f169.google.com with SMTP id h14so226138eaj.0 for <16907@debbugs.gnu.org>; Fri, 28 Feb 2014 17:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Q0zCDYW/a1JgDQcZNewPBPK1DIlFlpJ/nPa4WOPmeNc=; b=JXDzK1ZA3PZRwaBmSN9AJgLfJ6cvv7vDISkdkiouuqgbwcY/EUZLWtpPEFOZh/y3S5 Dqt+3jjG9MXKzFjKTatmaxbuKJmdIzNmU4/IvVUCQCituvgd0JUSwBZZvmj0VH3dsI0T AbQbMla/n/AeCDser8Xjde3rJxe5hKc8sWhY6js4U8bd34xd/B9eK6tgu+Zjg+4fHDnX PjpMoeWF2yUv6FlQMIS/XB0YxpQvsLsOfnfNc6s6Ypc3K6wXh7VZzJ2dcZW+H53lXrRT scRgG6W6FPFHfiafAbm05egfRle2RId4nx2YWrnqssZLNSOLOj127cp+oASbTCzKhk7b W3vA== X-Received: by 10.14.111.201 with SMTP id w49mr691365eeg.92.1393638912841; Fri, 28 Feb 2014 17:55:12 -0800 (PST) Original-Received: from axl ([93.109.195.252]) by mx.google.com with ESMTPSA id o5sm3313978eeg.8.2014.02.28.17.55.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Feb 2014 17:55:12 -0800 (PST) In-Reply-To: (Bozhidar Batsov's message of "Fri, 28 Feb 2014 17:40:02 +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:86420 Archived-At: (This is probably too late for 24.4) Bozhidar Batsov writes: > %w/W should be indented like other array literals. And %i/I too, I guess. Looks like this'll have to be done in two parts: 1. syntax-propertize the above cases differently from the rest of the percent literals (which are treated like strings). Don't know exactly what syntax to use. The values can contain any unpaired characters, except those delimiting them. Put syntax "symbol" on everything inside them, except whitespace? And still handle interpolations somehow. 2. Tokenize the elements inside the above literals without regard to characters used in them. `ruby-smie--backward-token' and its counterpart would have to be able to easily know when it's inside such literal. Alternatively, still propertize them as "general strings", but replace `smie-indent-inside-string' in `smie-indent-functions' with a specialized version that would look at what the string begins with. The change in syntax highlighting would have to be handled separately.