From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Wedler, Christoph" Newsgroups: gmane.emacs.devel Subject: RE: antlr-mode.el - need some support by python.el Date: Fri, 6 Feb 2015 15:14:02 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1423235665 27185 80.91.229.3 (6 Feb 2015 15:14:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Feb 2015 15:14:25 +0000 (UTC) Cc: =?iso-8859-1?Q?Fabi=E1n_E=2E_Gallina?= , "emacs-devel@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 06 16:14:25 2015 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 1YJkbw-0002AN-Jz for ged-emacs-devel@m.gmane.org; Fri, 06 Feb 2015 16:14:24 +0100 Original-Received: from localhost ([::1]:48892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJkbv-0001KL-Ml for ged-emacs-devel@m.gmane.org; Fri, 06 Feb 2015 10:14:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJkbi-0001K8-E6 for emacs-devel@gnu.org; Fri, 06 Feb 2015 10:14:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJkbe-0000qb-E1 for emacs-devel@gnu.org; Fri, 06 Feb 2015 10:14:10 -0500 Original-Received: from smtpgw01.sap-ag.de ([155.56.66.96]:42362 helo=smtpgw.sap-ag.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJkbe-0000q9-8e for emacs-devel@gnu.org; Fri, 06 Feb 2015 10:14:06 -0500 Thread-Topic: antlr-mode.el - need some support by python.el Thread-Index: AQHQQU/oxsXFZU5LQTeH9ayNQUY/OZzjvAeg In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.21.40.114] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 155.56.66.96 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:182534 Archived-At: > prog-mode sounds good. That doesn't prevent non-prog modes from using > it (and really, modes like xml-mode or latex-mode should inherit from > both text-mode and prog-mode). Ok, how should I name the variable then? `submode-indentation-context' ? >> + (defvar python-submode-indentation-context nil >> + "((MIN . MAX) LEFTMOST-COL . ).") >> Ok, here is some real doc: > Sounds like a good start. Two questions: > - how/who provides the ? Is it the outer mode (which hence > needs "internal" knowledge of the inner mode)? > - for some outer modes (think of a literate programming mode, for > example), the chunk specified by MIN/MAX should really be considered > as being a continuation of a previous chunk. So maybe the inner mode > should be provided with some way to find the "text before MIN" (if any)= . The values are provided by the outer mode. But the inner mode decides what it expects in (that's why I called it SUBMODE-SPECIFIC in the "real doc"). Reason: the outer mode wants support from the inner mode, thus it should be easy for the inner mode... (and there are more potential inner than outer modes). While it is true that the chunk specified by MIN/MAX should really be considered begin a continuation of a "chunk series", most modes won't probably like the idea of having to react to the "text before MIN", because that would require them to create a temporary buffer for the indent calculation. Providing a possibility for some initial syntactic context is probably easier. E.g. cc-mode can decide that it can accept some initial value for c-syntactic-context... Christoph