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: [Patch] hard-widen-limits [was Re: Syntax tables for multiple modes [was: bug#22983: syntax-ppss returns wrong result.]] Date: Tue, 22 Mar 2016 07:57:27 -0400 Message-ID: References: <20160311151512.GD2888@acm.fritz.box> <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> <87mvpsbeok.fsf_-_@gmail.com> <87pounew9e.fsf@gmail.com> <87twjzda4h.fsf@gmail.com> <87lh5bd4ib.fsf@gmail.com> <87egb3ryjc.fsf@gmail.com> <877fgusum3.fsf@gmail.com> <8737risu8d.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458647891 12040 80.91.229.3 (22 Mar 2016 11:58:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Mar 2016 11:58:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vitalie Spinu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 22 12:58:02 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 1aiKwM-0007TL-2B for ged-emacs-devel@m.gmane.org; Tue, 22 Mar 2016 12:57:38 +0100 Original-Received: from localhost ([::1]:35528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiKwL-0006zC-Fr for ged-emacs-devel@m.gmane.org; Tue, 22 Mar 2016 07:57:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiKwI-0006z4-FR for emacs-devel@gnu.org; Tue, 22 Mar 2016 07:57:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiKwE-0007xJ-FG for emacs-devel@gnu.org; Tue, 22 Mar 2016 07:57:34 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:19090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiKwE-0007wS-BI for emacs-devel@gnu.org; Tue, 22 Mar 2016 07:57:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CVDQA731xV/5a2xEVcgxCEAsEVh0sEAgKBPDsSAQEBAQEBAYEKQQWDXQEBAwFWIxALNAcLFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FnxeSFIIUgUUjgjuBWSKCeAEBAQ X-IPAS-Result: A0CVDQA731xV/5a2xEVcgxCEAsEVh0sEAgKBPDsSAQEBAQEBAYEKQQWDXQEBAwFWIxALNAcLFBgNJIg3CM8jAQEBAQYBAQEBHos6hQUHhC0FnxeSFIIUgUUjgjuBWSKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="197703001" Original-Received: from 69-196-182-150.dsl.teksavvy.com (HELO pastel.home) ([69.196.182.150]) by ironport2-out.teksavvy.com with ESMTP; 22 Mar 2016 07:57:27 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 2ECE064302; Tue, 22 Mar 2016 07:57:27 -0400 (EDT) In-Reply-To: <8737risu8d.fsf@gmail.com> (Vitalie Spinu's message of "Tue, 22 Mar 2016 11:05:38 +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:202063 Archived-At: >> So the consumer will need to set this variable and always follow it by widen. > Hm. This also implies that each consumer will need to take care of current > narrowing and re-narrow to new limits. This doesn't sound right. > I am also not sure what the behavior of save-restriction should be. Should > save-restriction unwind hard limits as well? IIRC past discussions on this issue, one option was to merge your set-widen-limits into narrow-to-region by adding an optional argument `hard'. And yes, I think save-restriction should unwind hard limits. Stefan