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: antlr-mode.el - need some support by python.el Date: Thu, 05 Feb 2015 09:27:45 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423146497 30249 80.91.229.3 (5 Feb 2015 14:28:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2015 14:28:17 +0000 (UTC) Cc: "=?windows-1252?Q?Fabi?= =?windows-1252?Q?=E1n?= E. Gallina" , "emacs-devel@gnu.org" To: "Wedler\, Christoph" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 05 15:28:16 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 1YJNPj-0000G3-Os for ged-emacs-devel@m.gmane.org; Thu, 05 Feb 2015 15:28:15 +0100 Original-Received: from localhost ([::1]:42336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJNPd-00080N-RG for ged-emacs-devel@m.gmane.org; Thu, 05 Feb 2015 09:28:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJNPL-0007ww-Ub for emacs-devel@gnu.org; Thu, 05 Feb 2015 09:27:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJNPI-0000uF-Jm for emacs-devel@gnu.org; Thu, 05 Feb 2015 09:27:51 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:56791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJNPI-0000u8-FE for emacs-devel@gnu.org; Thu, 05 Feb 2015 09:27:48 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t15ERjDj022629; Thu, 5 Feb 2015 09:27:45 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 63681FB3; Thu, 5 Feb 2015 09:27:45 -0500 (EST) In-Reply-To: (Christoph Wedler's message of "Thu, 5 Feb 2015 11:39:59 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5208=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5208> : inlines <2034> : streams <1385187> : uri <1847077> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:182447 Archived-At: > You are right - for a start, I started with a variable specifically for > Python, but in the end, I would see it as part of prog-mode (s/th like > xml-mode would not be covered, but to make it part of fundamental-mode > is probably too generic?). 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). > + (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). I guess for your use case, the second point doesn't apply, tho, so maybe we can skip this part for now. > Is this fine for you? Should I send a corresponding patch to > progmodes/prog-mode.el ? Sure, Stefan