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: Sun, 20 Mar 2016 23:11:52 -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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458529949 20913 80.91.229.3 (21 Mar 2016 03:12:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2016 03:12:29 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel , Dmitry Gutov To: Vitalie Spinu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 04:12:19 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 1ahqGO-0006c4-Pk for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 04:12:16 +0100 Original-Received: from localhost ([::1]:55349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahqGL-0005DS-0k for ged-emacs-devel@m.gmane.org; Sun, 20 Mar 2016 23:12:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahqG8-0005DN-Ql for emacs-devel@gnu.org; Sun, 20 Mar 2016 23:12:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahqG5-0006ya-HM for emacs-devel@gnu.org; Sun, 20 Mar 2016 23:12:00 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:56075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahqG5-0006xa-BS for emacs-devel@gnu.org; Sun, 20 Mar 2016 23:11:57 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u2L3BqGx020944; Sun, 20 Mar 2016 23:11:52 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 8B797AE240; Sun, 20 Mar 2016 23:11:52 -0400 (EDT) In-Reply-To: <87a8lsd4j3.fsf@gmail.com> (Vitalie Spinu's message of "Mon, 21 Mar 2016 02:05:20 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.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 RV5616=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5616> : inlines <4536> : streams <1606280> : uri <2170994> 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:201969 Archived-At: > BTW, I parse-partial-sexp must abide hard-widen-limits as well. I don't understand what this means. parse-partial-sexp is passed 2 locations and it works between them. There's not much opportunity for widening. But yes, syntax-ppss should obey hard-widen-limits. > A patch that would require hunting every single mode out there and > implementing multi-modes locally should have been more carefully > considered IMO. I must say I don't understand how what we have is so very different from what you suggest. Of course, I fully agree on the need to deprecate indent-line-function and use a side-effect free replacement which returns the desired indentation (instead performing the indentation). I think both suggestions require changes to every mode, and in both cases the changes can be reduced to a one-liner or close enough (for the simple case). Admittedly, for it to be a one-liner, we'll need to provide a standard helper function. Stefan