From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Syntax ambiguities in narrowed buffers and multiple major modes: a proposed solution. Date: Sat, 04 Mar 2017 12:41:23 -0700 Message-ID: <87y3wkj0d8.fsf@tromey.com> References: <20170225135355.GA2592@acm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488656524 1213 195.159.176.226 (4 Mar 2017 19:42:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2017 19:42:04 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 04 20:41:58 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 1ckFYx-0007cX-GZ for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2017 20:41:55 +0100 Original-Received: from localhost ([::1]:36395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckFZ2-0007fL-2q for ged-emacs-devel@m.gmane.org; Sat, 04 Mar 2017 14:42:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckFYv-0007eU-Fc for emacs-devel@gnu.org; Sat, 04 Mar 2017 14:41:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckFYs-0005uK-7D for emacs-devel@gnu.org; Sat, 04 Mar 2017 14:41:53 -0500 Original-Received: from gproxy9-pub.mail.unifiedlayer.com ([69.89.20.122]:40527 helo=gproxy9.mail.unifiedlayer.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ckFYr-0005em-Vw for emacs-devel@gnu.org; Sat, 04 Mar 2017 14:41:50 -0500 Original-Received: from CMOut01 (unknown [10.0.90.82]) by gproxy9.mail.unifiedlayer.com (Postfix) with ESMTP id AF9E81E0B23 for ; Sat, 4 Mar 2017 12:41:30 -0700 (MST) Original-Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id rvhQ1u0042f2jeq01vhTpB; Sat, 04 Mar 2017 12:41:30 -0700 X-Authority-Analysis: v=2.1 cv=U+QBU4bu c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=6Iz7jQTuP9IA:10 a=pbMaq_ykjXNPZvOmEa4A:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KSkbZW6yKftcWIcsrwobq9GhLzLUNrGP7y0/h3IUoLI=; b=SFKOYFb3gfQa4yrXLFYKUPgEQ4 s0I4Zm/MmCBruWibeG9oBOYBOPtAcLw14vAKCqijYVOWsfaBtBau4LRmdRcQIZmdadXbCH4VEDrOS GGw7lCnCMnv5DsAJc3ME41ty6; Original-Received: from 71-218-43-111.hlrn.qwest.net ([71.218.43.111]:52788 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1ckFYR-0003iT-Ul; Sat, 04 Mar 2017 12:41:24 -0700 X-Attribution: Tom In-Reply-To: <20170225135355.GA2592@acm> (Alan Mackenzie's message of "Sat, 25 Feb 2017 13:53:56 +0000") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.43.111 X-Exim-ID: 1ckFYR-0003iT-Ul X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-43-111.hlrn.qwest.net (bapiya) [71.218.43.111]:52788 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 69.89.20.122 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:212751 Archived-At: >>>>> "Alan" == Alan Mackenzie writes: Alan> o - Each time parse-partial-sexp encounters an island open, it pushes Alan> the current state, including the syntax table, onto this stack, Alan> reinitialises the state, and optionally sets the syntax table, for Alan> the island just being opened. The island begins at the buffer Alan> position _after_ the one bearing the island open syntax. This approach means that an island can't start at the beginning of a buffer. I don't have an example offhand where this matters, but it seems like an arbitrary restriction, and furthermore one not imposed by the current approach of having syntax table property on the affected characters. Maybe an island could be delimited in this same way, that is, an island would be a contiguous group of characters that have a property ('island, or whatever) with the same value. Alan> o - A new function would be needed to get the "base" syntax of a Alan> position, the syntax it would have if it weren't for any island Alan> open/close syntax table properties on it. Would you mind giving an example of what this would be used for? Tom