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:04: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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1458570171 13251 80.91.229.3 (21 Mar 2016 14:22:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2016 14:22:51 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 15:22:41 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 1ai0j5-0004e7-Ft for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 15:22:35 +0100 Original-Received: from localhost ([::1]:58164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai0j5-0000DV-0b for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2016 10:22:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai0c3-0005y6-PG for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:15:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai0bx-0001OQ-Td for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:15:19 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:40664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai0bx-0001OC-NG for emacs-devel@gnu.org; Mon, 21 Mar 2016 10:15:13 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ai0bq-0000Vy-Ao for emacs-devel@gnu.org; Mon, 21 Mar 2016 15:15:06 +0100 Original-Received: from 157-52-2-179.cpe.teksavvy.com ([157.52.2.179]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2016 15:15:06 +0100 Original-Received: from monnier by 157-52-2-179.cpe.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2016 15:15:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 11 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 157-52-2-179.cpe.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:aE9OsrP7pHwW4G2EJ9k2vgIBqh8= 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:201996 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. Stefan