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: Mon, 08 Jun 2015 09:26:20 -0400 Message-ID: References: <54F38FD3.1020307@yandex.ru> <54F47CD3.5080708@yandex.ru> <54F4A62F.3040403@yandex.ru> <54F4BA93.4000801@yandex.ru> <54F73EE0.9070306@yandex.ru> <5571E070.9050905@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1433770016 10658 80.91.229.3 (8 Jun 2015 13:26:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2015 13:26:56 +0000 (UTC) Cc: "=?windows-1252?Q?Fabi=E1n?= E.Gallina" , "emacs-devel@gnu.org" , Dmitry Gutov To: "Wedler\, Christoph" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 08 15:26:48 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 1Z1x4h-0006l8-MJ for ged-emacs-devel@m.gmane.org; Mon, 08 Jun 2015 15:26:47 +0200 Original-Received: from localhost ([::1]:58038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1x4c-0007vR-15 for ged-emacs-devel@m.gmane.org; Mon, 08 Jun 2015 09:26:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1x4O-0007vG-H4 for emacs-devel@gnu.org; Mon, 08 Jun 2015 09:26:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1x4J-0006VX-Ba for emacs-devel@gnu.org; Mon, 08 Jun 2015 09:26:28 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1x4J-0006VL-4z for emacs-devel@gnu.org; Mon, 08 Jun 2015 09:26:23 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t58DQKEM002987; Mon, 8 Jun 2015 09:26:20 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 7AE1CAE13F; Mon, 8 Jun 2015 09:26:20 -0400 (EDT) In-Reply-To: (Christoph Wedler's message of "Mon, 8 Jun 2015 09:12:35 +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 RV5331=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5331> : inlines <3172> : streams <1452053> : uri <1952810> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 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:187094 Archived-At: >> I think the string value is not ideal, because then the inner mode can't >> cache syntactic information, and reuse it between chunks. This is >> something we probably want to facilitate. Maybe we should simply document that it's valid&expected for the inner mode to add text-properties to the string. > - the inner mode is encouraged to change PREVIOUS-CHUNKS inside > `prog-indentation-context' to the inner mode specific value. The > outer mode can retrieve the value after the call and use it for > further calls. This looks fiddly, and at least requires changing the doc of PREVIOUS-CHUNKS to mention that it can contain yet some other data in some "internal" format. > The get-previous-chunk function case (for literate programming = the > case Stefan and you, Dmitry, were interested in): I agree, this is > non-trivial (see my remarks back in Feb/Mar). I can't imagine it being significantly more complex than the string case. In the worst case, you can fairly easily turn the function into a string by extracting&concatenating the corresponding chunks. Stefan