From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Bug #25608 and the comment-cache branch Date: Mon, 13 Feb 2017 08:14:21 -0800 (PST) Message-ID: <39fa7b7c-f40e-4814-b78a-d3cc96e64e55@default> References: <20170202202418.GA2505@acm> <83lgtouxpf.fsf@gnu.org> <20170202215154.GB2505@acm> <83h94bvhzw.fsf@gnu.org> <20170205220045.GB2294@acm> <83d1es61li.fsf@gnu.org> <20170211232511.GA13712@acm> <20170212120553.GB3087@acm> <5dac24ba-a73e-b4f4-f595-30f86564b00a@yandex.ru> <20170212172900.GC3087@acm> <87mvdq97zy.fsf@jun.debian8.nb> <87inoe8u87.fsf@jun.debian8.nb> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1487002486 12139 195.159.176.226 (13 Feb 2017 16:14:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2017 16:14:46 +0000 (UTC) Cc: netjune@qq.com, emacs-devel@gnu.org To: zhanghj , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 13 17:14:42 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdJGv-0002X1-79 for ged-emacs-devel@m.gmane.org; Mon, 13 Feb 2017 17:14:37 +0100 Original-Received: from localhost ([::1]:57886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdJH0-0007pb-Ru for ged-emacs-devel@m.gmane.org; Mon, 13 Feb 2017 11:14:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdJGt-0007pT-UI for emacs-devel@gnu.org; Mon, 13 Feb 2017 11:14:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdJGq-00018A-QJ for emacs-devel@gnu.org; Mon, 13 Feb 2017 11:14:35 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:33011) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cdJGq-00017Y-EW for emacs-devel@gnu.org; Mon, 13 Feb 2017 11:14:32 -0500 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v1DGERTI007122 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 Feb 2017 16:14:28 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v1DGERch007901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 Feb 2017 16:14:27 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v1DGEMta027222; Mon, 13 Feb 2017 16:14:25 GMT In-Reply-To: <87inoe8u87.fsf@jun.debian8.nb> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212341 Archived-At: > > Similarly, it would be a lot more convenient for syntax-ppss to consult > > some dynamically-scoped variable to find the "beginning of (sub)buffer"= , > > rather than having to scan text properties. > > > Every island may has two varibles like island-begin-marker and > island-end-marker in island-variables. Then we don't need to scan text > property. Just use the two markers to identify the region of the island. FWIW: This is exactly what I do in `zones.el'. You can have any number of such "island" (or zones) variables. Each is a list of such marker pairs. Actually, each pair can have form (ID POSITION1 POSITION2 . EXTRA), where ID is a natural-number zone identifier, the POSITIONS are natural numbers, markers for the same buffer, or "readable markers" for the same buffer. EXTRA is a list of anything (typically nil). A "readable marker" is a list (marker BUFFER POSITION), where BUFFER is a buffer name (string) and POSITION is a buffer position (number only). Readable markers let you save zones persistently (e.g., as bookmarks) and restore them. https://www.emacswiki.org/emacs/Zones