From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: zhanghj Newsgroups: gmane.emacs.devel Subject: Re: Bug #25608 and the comment-cache branch Date: Mon, 13 Feb 2017 09:47:45 +0800 Message-ID: <87mvdq97zy.fsf@jun.debian8.nb> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486963768 28517 195.159.176.226 (13 Feb 2017 05:29:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2017 05:29:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux) Cc: netjune@qq.com, emacs-devel@gnu.org, Stefan Monnier , Dmitry Gutov To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 13 06:29:22 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 1cd9CU-0006zD-Bb for ged-emacs-devel@m.gmane.org; Mon, 13 Feb 2017 06:29:22 +0100 Original-Received: from localhost ([::1]:54623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cd9CZ-0002vl-TG for ged-emacs-devel@m.gmane.org; Mon, 13 Feb 2017 00:29:27 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cd5kL-00075W-I7 for emacs-devel@gnu.org; Sun, 12 Feb 2017 20:48:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cd5kI-0000wp-G1 for emacs-devel@gnu.org; Sun, 12 Feb 2017 20:48:05 -0500 Original-Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:35582) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cd5kI-0000vc-AA for emacs-devel@gnu.org; Sun, 12 Feb 2017 20:48:02 -0500 Original-Received: by mail-pg0-x242.google.com with SMTP id 204so8321241pge.2 for ; Sun, 12 Feb 2017 17:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:cc:date:in-reply-to:message-id :user-agent:mime-version; bh=xj09rJyIZmdAO6am+w3VThmhteMoHmMHJ0Q+zQtOXYM=; b=QK7nmpgk+HiSMjc/b9SxzfP9Yrk1WNVnrR8j1Z8Nhau1013tHxr7memXo1OtdtwrE2 IW0RoBNwqYJw9cBWFwTHZHNPTFqrXJj2aiMbiRlw9Z+R06NRGMMiu4VoCyj6VNkYoRJa ojamBZ80j8qCQcuj7MgNze0w+zbKl6Z78ME7w5DHoQpFEVm2rUhAXlZOnTa2S6fnAb84 lEGKsefyiQQ3IOQW4LG0I488G/nx6o9bcYIbx9IperHuT4dKwbY0iHEwiYMWJhq+tUGL 0kz3SOjEaUKyBl5q1SLeXIM+wedfT5iMnkMDKdv8f98o1c4wHyzVqxVX+AT2A7jbjsSJ asvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:cc:date :in-reply-to:message-id:user-agent:mime-version; bh=xj09rJyIZmdAO6am+w3VThmhteMoHmMHJ0Q+zQtOXYM=; b=aDWxMVEMko0/4N8kjxbk+h4np+EBT5dB3nFzw+De3ra+t7waAMcl7M5r2X/IaDKfG/ IekNZ7Rp5oSOX8cUGtAdsIVjWL9J+isxOewWPWds0/hdwMpRTUanyM+Om2nNg6B5n3r5 xkdk9q3TUWE3EUZg2hHYYJEQEa1OaC6xIgu8zJ6iUGFvC8QdKJU+D2N0XdmrcEZHaOgs z4pHdf93I+yv3VIl6TRU/SuXy+j/LhDvwQxq7Dm8iREZY8pTzOWqtZybYKDKlkD2D74w Eby+Ofa2P5q7Tt3CzW3LQ4dtA/k7L6fCRhD02XI6NR5I/wbdCw3XQqQqd9hAX3ySjE+1 CldQ== X-Gm-Message-State: AMke39nI8uTJc1WStBAc7y3zF3zHhVYAaiwTFlRDYVDNTSnmC+KD267izjN23ZnAD8y9Ow== X-Received: by 10.99.0.196 with SMTP id 187mr24213350pga.139.1486950479802; Sun, 12 Feb 2017 17:47:59 -0800 (PST) Original-Received: from jun.debian8.nb ([223.95.81.70]) by smtp.gmail.com with ESMTPSA id 199sm16972197pfu.91.2017.02.12.17.47.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Feb 2017 17:47:59 -0800 (PST) In-Reply-To: <20170212172900.GC3087@acm> (Alan Mackenzie's message of "Sun, 12 Feb 2017 17:29:00 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::242 X-Mailman-Approved-At: Mon, 13 Feb 2017 00:27:15 -0500 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:212319 Archived-At: Alan Mackenzie writes: > > Multiple-major-mode code? Narrowing is not a good way of doing this, > and I propose a better way. > >> > If I understand correctly, the problem is that multiple-major-mode modes >> > are trying to use narrowing to get a null syntactic context. They are >> > trying this because we don't provide anything better. We should provide >> > something better. I suggested such a something last spring ("islands"). > >> You suggested implementing a big, ambiguously defined feature. > > It was big, yes, but reasonably well defined. What I really meant in my > last paragraph was that the syntax bits of "islands" should be used in > place of what is now done with narrowing. This would introduce two new > syntax classes "open island" and "close island". "Open island" would > stack the current syntactic state and start anew, with a new syntax > table. "Close island" would pop this stack, restoring the previous > state and syntax table. > How about adding two text properties like island-major-mode and island-variables? All chars in the same island have the same values of the two text properties.