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: [ruby-mode] Private/protected method definition layout in Ruby 2.1 Date: Wed, 15 Jan 2014 13:51:14 -0500 Message-ID: References: <0E94BE5F9874463D9B4C2A039A3C24E9@gmail.com> <87lhyh2jo4.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389811892 26913 80.91.229.3 (15 Jan 2014 18:51:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 18:51:32 +0000 (UTC) Cc: Bozhidar Batsov , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 15 19:51:37 2014 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 1W3VYs-000620-DQ for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 19:51:34 +0100 Original-Received: from localhost ([::1]:56711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3VYs-0007TV-20 for ged-emacs-devel@m.gmane.org; Wed, 15 Jan 2014 13:51:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3VYi-0007T8-G6 for emacs-devel@gnu.org; Wed, 15 Jan 2014 13:51:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3VYZ-0000PY-Iu for emacs-devel@gnu.org; Wed, 15 Jan 2014 13:51:24 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:65131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3VYZ-0000PL-EZ for emacs-devel@gnu.org; Wed, 15 Jan 2014 13:51:15 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCoyj/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFFMCoyj/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="45033773" Original-Received: from 76-10-140-163.dsl.teksavvy.com (HELO pastel.home) ([76.10.140.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 15 Jan 2014 13:51:14 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A11786048B; Wed, 15 Jan 2014 13:51:14 -0500 (EST) In-Reply-To: <87lhyh2jo4.fsf@yandex.ru> (Dmitry Gutov's message of "Wed, 15 Jan 2014 20:18:19 +0200") 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.181 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:168487 Archived-At: > `private' is a method, called with the expression `def ... end`. Ah, that makes sense. > I believe we can also handle this in the rules-function. Add a new rule > for (:before . "def"), see if the preceding token is one of `private', > `public', `protected', and if so, indent to its beginning column. If that's works, it's preferable, indeed. Especially in light of the above (i.e. changing the parsing would be wrong). > Can we install such a change, with either of the approaches, during the > feature freeze? I think it's OK, yes. We're not yet in the "regression-only" phase. Stefan