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: Mon, 21 Mar 2016 10:54:58 -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> <87mvpsbeok.fsf_-_@gmail.com> <87pounew9e.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458572427 21127 80.91.229.3 (21 Mar 2016 15:00:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2016 15:00:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 16:00:18 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 1ai1JZ-0008TX-VN for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 16:00:18 +0100 Original-Received: from localhost ([::1]:58300 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai1JZ-0003Oh-86 for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 11:00:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai1JV-0003O3-Bq for emacs-devel@gnu.org; Mon, 21 Mar 2016 11:00:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai1JQ-0003vr-97 for emacs-devel@gnu.org; Mon, 21 Mar 2016 11:00:13 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai1JQ-0003vJ-32 for emacs-devel@gnu.org; Mon, 21 Mar 2016 11:00:08 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ai1JL-0008LR-7t for emacs-devel@gnu.org; Mon, 21 Mar 2016 16:00:03 +0100 Original-Received: from 76-10-140-188.dsl.teksavvy.com ([76.10.140.188]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2016 16:00:03 +0100 Original-Received: from monnier by 76-10-140-188.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2016 16:00:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 14 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 76-10-140-188.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:1DGnWiDaKwMdjWpMlM5ZdpMBY54= 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:202003 Archived-At: >>> (defun call-with-hard-narrowing (from to func) >>> (make-local-variable 'internal--hard-widen-limits) >>> (let ((internal--hard-widen-limits (cons from to))) >>> (funcall func))) >> Hmm... I now realize that this won't handle the case of info-mode >> buffers (and similarly rmail buffers) where the hard-narrowing is not >> scoped. > What does this mean in plain English? That it sets narrowing and leaves it there. So it can't use call-with-hard-narrowing for that. Stefan