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: Tue, 22 Mar 2016 22:07:01 -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> <87twk0beuh.fsf@gmail.com> <877fgvgbr1.fsf@gmail.com> <87bn67eq4t.fsf@gmail.com> <87bn66qsgo.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458698854 15416 80.91.229.3 (23 Mar 2016 02:07:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 02:07:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vitalie Spinu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 03:07:26 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 1aiYCi-0008Mt-2T for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 03:07:24 +0100 Original-Received: from localhost ([::1]:40498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiYCh-0002zs-ER for ged-emacs-devel@m.gmane.org; Tue, 22 Mar 2016 22:07:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiYCT-0002zf-Gw for emacs-devel@gnu.org; Tue, 22 Mar 2016 22:07:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiYCO-00007D-Ef for emacs-devel@gnu.org; Tue, 22 Mar 2016 22:07:09 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiYCO-00005q-AM for emacs-devel@gnu.org; Tue, 22 Mar 2016 22:07:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A2FgA731xV/5a2xEVcgxCEAoVVwwsEAgKBPDwRAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBBwEBAQEeizqFBQeELQEEsz+BRSOBZlWBWSKCeAEBAQ X-IPAS-Result: A0A2FgA731xV/5a2xEVcgxCEAoVVwwsEAgKBPDwRAQEBAQEBAYEKQQWDXQEBAwFWIwULCzQSFBgNJIg3CM8jAQEBBwEBAQEeizqFBQeELQEEsz+BRSOBZlWBWSKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="197854700" Original-Received: from 69-196-182-150.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.182.150]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 22 Mar 2016 22:07:02 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 301AFAE1F4; Tue, 22 Mar 2016 22:07:01 -0400 (EDT) In-Reply-To: <87bn66qsgo.fsf@gmail.com> (Vitalie Spinu's message of "Tue, 22 Mar 2016 19:26:47 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.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:202119 Archived-At: > Of course the indentation context data structure should be mode specific and > modes must be constructing it themselves. But some useful degree of uniformity > is surely possible. For example FIRST-COLUMN is a very simple one dimensional > signature. Yes, it's an attractive idea. But for example in the case of SMIE we never compute this context directly, instead we discover it as we parse the text backward from point. But I guess we could represent the context as an integer (the position from which to parse backward). Still, in the ERB case we'd need to mix the HTML context with the Ruby context, so the representation of the context can't be "internal to the major mode". Stefan