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: [Emacs-diffs] emacs-25 504696d: Etags: yet another improvement in Ruby tags Date: Thu, 4 Feb 2016 02:46:45 +0300 Message-ID: <56B29165.3040404@yandex.ru> References: <20160203162536.2954.45438@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1454543239 21964 80.91.229.3 (3 Feb 2016 23:47:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Feb 2016 23:47:19 +0000 (UTC) To: emacs-devel@gnu.org, Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 04 00:47:12 2016 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 1aR78h-0006hu-Kf for ged-emacs-devel@m.gmane.org; Thu, 04 Feb 2016 00:47:11 +0100 Original-Received: from localhost ([::1]:38330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR78g-0005Gm-SR for ged-emacs-devel@m.gmane.org; Wed, 03 Feb 2016 18:47:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR78P-0005GX-7e for emacs-devel@gnu.org; Wed, 03 Feb 2016 18:46:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aR78O-00008l-4r for emacs-devel@gnu.org; Wed, 03 Feb 2016 18:46:53 -0500 Original-Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]:36724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR78K-00007G-7f; Wed, 03 Feb 2016 18:46:48 -0500 Original-Received: by mail-lf0-x231.google.com with SMTP id 78so25188777lfy.3; Wed, 03 Feb 2016 15:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=SFsxdG8xeS4Db8UUIIRyot+C4EwCry2OqLF7USNr+hA=; b=ySAvmpmTc2xxLA6r1p5iBGWPiMgOimbfamvx2Qqhj2ZKwQgjDsPUunoiYs2ExU4oHD 1OwA2HtemKFVkjVZ0A9EHxNAvkFt0rB/FB9qREBcmUUoU6Q5tdqm/xcQ4Ovs2tlukzzn 8TibpK1+4cGeP+DI7EO0Ktz0R/Jh2qj2rFFDTVFm2rdOsAZa14URPXAfCeGG9ll7an0c geytYOyRYwqWQ7PjSz5uHQmBS7AqUQDtQWgEomwL9EnD9vjW9xDxbHsR5q8vAAH5sWJC RMeYkT/kCdegArIVPZcGJOBOtNe6j49+2GzVkUfX2SLreqAL2leXqroP+oFChFvIsngB F5ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=SFsxdG8xeS4Db8UUIIRyot+C4EwCry2OqLF7USNr+hA=; b=UFp4TSPkw63JPdcuOpCj/Zb7HxZUBmn/uQrVDzE4f/wNWxM58CBtsPxG3LIo872Bkb 4LcT9vYwAY3FM1BuoLDzpOin/HE3M+Ujfn2A+3J1UVKoabYYx6IjDXUUEkwwttwawj9o 7IsGsRrlL3v27X2Zfa6879VIghUjNXK3+oKxiPIXMwlvckZO8C4NmhC2wy2DEcN7rz9R tqnroCTi1kBcLxtVmw8FHIBc13P+aiJzx2Ni26UbCyZrfHcKcJSK2J/58+D80eCka02b kCcZgiSKDhtfyCIjTyhmH0KT8CnDLVK2V1JJXeipklVcrIYG9M+Du3dguAc81XoNLqWl +VnQ== X-Gm-Message-State: AG10YOSMhKnlIRLquEWS//wJp+HDNcbDQkmDYDnko4knZjAqOHdpbiJYMDKJcE8gRc2RQA== X-Received: by 10.25.166.130 with SMTP id p124mr2175264lfe.120.1454543207367; Wed, 03 Feb 2016 15:46:47 -0800 (PST) Original-Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id h72sm1183642lfe.33.2016.02.03.15.46.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Feb 2016 15:46:45 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::231 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:199268 Archived-At: On 02/03/2016 07:25 PM, Eli Zaretskii wrote: > --- a/test/etags/ruby-src/test1.ru > +++ b/test/etags/ruby-src/test1.ru > @@ -24,10 +24,14 @@ module A > end > def X Just noticed this. attr_X calls will not, as a rule, be inside a method definition (which is what 'def X' is). If an attr_X call is inside a method definition, we're unlikely to be able to make much sense of it. Most likely, the arguments will be local variables, not Symbol literals. It's also likely that the target of this call in that kind of situation won't be the current class. Anyway, the example shouldn't put attr_X calls inside a method definition, or it gives an impression that we handle this situation intentionally, or somehow differently from the usual case. Whereas we could as well skip those tags altogether (but we don't really have to, as long as we only generate non-qualified tags, and check that every argument is a Symbol literal, i.e. it starts with a colon). > attr_reader :foo > - attr_reader :read1, :read2; attr_writer :write1, :write2 > - attr_writer :bar > + attr_reader :read1 , :read2; attr_writer :write1, :write2 > + attr_writer :bar, > + :baz, > + :more > attr_accessor :tee > - alias_method :qux, :tee > + alias_method :qux, :tee, attr_accessor :bogus This one is a bit weird as well: - An alias_method call with three arguments will raise an ArgumentError. - If it didn't, the 'attr_accessor :bogus' calls would raise a SyntaxError, due to evaluation rules. However, an attr_X call can be inside an expression, such as: class C puts(attr_accessor :bogus) end This is not a typical case, we don't need to handle it, but it's odd to see a test case that implies that this example is invalid, and we somehow prohibit it. Hopefully, this observation will allow you to simplify some code.