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: Syntax tables for multiple modes [was: bug#22983: syntax-ppss returns wrong result.] Date: Mon, 21 Mar 2016 10:02:12 -0400 Message-ID: References: <20160311151512.GD2888@acm.fritz.box> <20160311212410.GG2888@acm.fritz.box> <73903215-f94b-e194-7bfe-0d6350c95769@yandex.ru> <20160311221540.GH2888@acm.fritz.box> <2c301ec9-041d-9172-d628-479062314b23@yandex.ru> <20160314151621.GF1894@acm.fritz.box> <874mc2dqtk.fsf@gmail.com> <87egb5cpmg.fsf@gmail.com> <87a8lsd4j3.fsf@gmail.com> <328c7461-62c6-4228-f622-626349613a1d@yandex.ru> <87fuvkf1gx.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458568983 25189 80.91.229.3 (21 Mar 2016 14:03:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2016 14:03:03 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 15:02:59 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 1ai0Q5-0002dd-L3 for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 15:02:57 +0100 Original-Received: from localhost ([::1]:57974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai0Q2-0003eB-09 for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 10:02:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai0Pj-0003dr-MD for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:02:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai0Pf-0006fG-Rc for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:02:35 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:39788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai0Pf-0006fC-L0 for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:02:31 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ai0Pd-0002Px-E8 for emacs-devel@gnu.org; Mon, 21 Mar 2016 15:02:29 +0100 Original-Received: from 157-52-2-179.cpe.teksavvy.com ([157-52-2-179.cpe.teksavvy.com]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2016 15:02:29 +0100 Original-Received: from monnier by 157-52-2-179.cpe.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2016 15:02:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 157-52-2-179.cpe.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:S9gDszCUJfBQL87OY07Mi7QRDiU= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:201991 Archived-At: > Note that I don't mind FIRST-COLUMN functionality. I think it's harmless and > probably useful. I mostly mind the last two arguments of > prog-indentation-context. OK, so you're OK with FIRST-COLUMN. The last two args are: - (START . END), which you actually do want, except you want to store it in hard-widen-limit. I'm OK with storing it elsewhere. - PREVIOUS-CHUNKS. It can be a string, in which case it's just like your STRING-BEFORE. So your main issues with it are either that you don't want to allow it to be a function, or that you want to store/pas it in a different way, right? >> Almost all of them care whether the current line contains }, or `end', or >> `else', and so on. > Indeed. But this information is trivial to retrieve from STRING-AFTER. In the case of SMIE, it would probably not be too difficult to adjust it so it can work with STRING-AFTER, tho I definitely wouldn't call it trivial to implement the case of "END END END aligns with the matching outer BEGIN" which is currently supported (and was default until 24.5 or so). But I must say that I don't understand why you need this STRING-AFTER thingy. Isn't that text already right there in the buffer? E.g. in prog-indentation-context, we do have something equivalent to hard-widen-limit and to STRING-BEFORE but we have nothing like STRING-AFTER: the indentation code is expected to get that info by looking at the buffer after point. Stefan