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: Wed, 23 Mar 2016 09:18:13 -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> <87io0eqswd.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458739143 8771 80.91.229.3 (23 Mar 2016 13:19:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2016 13:19:03 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 14:18:53 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 1aiigV-0005Mf-QH for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 14:18:51 +0100 Original-Received: from localhost ([::1]:44036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiigV-00035P-38 for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2016 09:18:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiig7-0002ec-3e for emacs-devel@gnu.org; Wed, 23 Mar 2016 09:18:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiig2-0007ig-An for emacs-devel@gnu.org; Wed, 23 Mar 2016 09:18:27 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:46942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiig2-0007i8-40 for emacs-devel@gnu.org; Wed, 23 Mar 2016 09:18:22 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1aiig0-0004zf-HO for emacs-devel@gnu.org; Wed, 23 Mar 2016 14:18:20 +0100 Original-Received: from 69-196-182-150.dsl.teksavvy.com ([69.196.182.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Mar 2016 14:18:20 +0100 Original-Received: from monnier by 69-196-182-150.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Mar 2016 14:18:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 69-196-182-150.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:mD9GhZVPKJYAJa49Cz4ArSxcxzA= 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:202134 Archived-At: >> Since it's not on its own line, I don't see why it would be an issue >> for indentation. > It's a problem if you narrow to current span and allow inner mode to indent > first line. I guess it's an issue if the buffer is "always narrowed", in which case the "first" line might get indented accidentally, indeed. But otherwise, there's no reason for the generic mode to go through the trouble of "narrow + indent" this partial line. > Without narrowing it's not clear what is the contract that inner mode should > respect to handle previous chunk locations. For prog-indent-context we provide (START . END), as well as PREVIOUS-CHUNKS, where the contract is that the major mode's indentation code should only look at those parts of the buffer. It's up to the mode to decide whether it does that via narrowing, or some other way. Stefan