From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Small improvements to ruby-mode Date: Sun, 23 Jun 2013 16:30:23 +0400 Message-ID: <51C6EA5F.2040408@yandex.ru> References: <2A6700DEDCA640EF92B326002717596D@gmail.com> <87txkrm46t.fsf@yandex.ru> <6EF2AEF8D67840A2AF1C908AA3D0725F@gmail.com> <51C5A67A.2020002@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1371990650 26286 80.91.229.3 (23 Jun 2013 12:30:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Jun 2013 12:30:50 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Bozhidar Batsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 23 14:30:48 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 1UqjRQ-0000TH-Ba for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2013 14:30:48 +0200 Original-Received: from localhost ([::1]:45749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UqjRP-00078s-Sc for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2013 08:30:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UqjRJ-00078i-IE for emacs-devel@gnu.org; Sun, 23 Jun 2013 08:30:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UqjRF-0005cu-Bv for emacs-devel@gnu.org; Sun, 23 Jun 2013 08:30:41 -0400 Original-Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:54221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UqjRE-0005co-Tv for emacs-devel@gnu.org; Sun, 23 Jun 2013 08:30:37 -0400 Original-Received: by mail-la0-f42.google.com with SMTP id eb20so9113320lab.29 for ; Sun, 23 Jun 2013 05:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-antivirus:x-antivirus-status; bh=1aOrxGfg2e76bhheI2ZxhhwDfoIWqitf+im4XAG7/Kk=; b=dq2Zg01AEQ29TkqOvC5iM6eMktTBciOZf5n10pr9ODPSaJv8xMF225gYIET5Qct6ZX WoZ5yvM9VL8BAvZlUX2XQVUFDXbwugP8qnLeFC3YagywBvUairmUwj5lSLI7EomAXpz8 T574/EqF398gUsehtkBQy1VnjkD0GAnoocA8WwScLCjPLlK9A865TPvgY/dEjhI9dH38 lT6IzfjXvfsF5bqnl4/0t9nyuKm2cKIu7z8MxZAwU+lqmcYLVBEIF50TxyBiLkJjki/r RJzVrpDyLA5R/KYAusFduOU8Vgytg+tUS3LH9Gp7ZlmckS2ZgJHTG6uSxnsczY4dE90Y cdLA== X-Received: by 10.112.17.74 with SMTP id m10mr10856855lbd.18.1371990635630; Sun, 23 Jun 2013 05:30:35 -0700 (PDT) Original-Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPSA id m1sm4791748lag.3.2013.06.23.05.30.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Jun 2013 05:30:34 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: X-Antivirus: avast! (VPS 130623-1, 23.06.2013), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22a 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:160909 Archived-At: On 23.06.2013 10:20, Bozhidar Batsov wrote: >> I'm less sure about these. Every method on Kernel is usually called >> without an explicit receiver, and there are more of them. >> Let's wait for another opinion. > There are more of them, but most of them exist only when ruby is invoked > with -n/-p (for perl-like scripting) - normally chomp, chomp!, chop, etc > are not bound, which means we should not add them to the built-in list, > since nobody is actually wring Ruby applications using them. Matz > himself recommends that all the command-like methods from Kernel be > treated as reserved words - meaning it's considered a bad idea for > someone to introduce variables or methods named this way. If they were > highlighted properly fewer developers would fail to recognize their > "special" status. Looking at the Kernel module's docs there are less > than 30 such commands and they've barely changed in recent years. That makes sense, but should we highlight them the same way as keyword-like methods (which I've roughly defined for myself as stuff having to do with control flow, code generation and loading)? >> 1) I don't subscribe to your principle of single quotes vs. double >> quotes. So, when I'm adding an interpolation to a string, it's usually >> double-quoted already. > It's not exactly my principle :-) Well, it's in the style guide you're maintaining, and I haven't seen this exact phrasing elsewhere, IIRC. And there are enough popular projects that contradict or ignore it. > The toggling between string and symbol is pretty useful. Yes, I could've used it myself just the other day. It's not something I do too often either, though. > Btw, Dmitry, I noticed something strange about ruby-mode (at least in > 24.3) - the calculations for method and block boundaries seem to be off. > I'm not sure if you're aware of the problem or you need a more detailed > report. Not exactly sure what you mean, so yes, more details would be helpful. But please try the current trunk first.