From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: A vision for multiple major modes: some design notes Date: Fri, 22 Apr 2016 12:04:24 +0300 Message-ID: <838u065813.fsf@gnu.org> References: <20160420194450.GA3457@acm.fritz.box> <8360vb6o7u.fsf@gnu.org> <20160421213323.GD1775@acm.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1461315912 30825 80.91.229.3 (22 Apr 2016 09:05:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Apr 2016 09:05:12 +0000 (UTC) Cc: emacs-devel@gnu.org, dgutov@yandex.ru To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 22 11:05:07 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 1atX1O-0002CQ-Kn for ged-emacs-devel@m.gmane.org; Fri, 22 Apr 2016 11:05:06 +0200 Original-Received: from localhost ([::1]:57481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atX1I-0003GV-N0 for ged-emacs-devel@m.gmane.org; Fri, 22 Apr 2016 05:05:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atX0s-0002xk-Mq for emacs-devel@gnu.org; Fri, 22 Apr 2016 05:04:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atX0o-0000Sa-DC for emacs-devel@gnu.org; Fri, 22 Apr 2016 05:04:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atX0o-0000SW-A9; Fri, 22 Apr 2016 05:04:30 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3021 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1atX0n-0000UB-GG; Fri, 22 Apr 2016 05:04:29 -0400 In-reply-to: <20160421213323.GD1775@acm.fritz.box> (message from Alan Mackenzie on Thu, 21 Apr 2016 21:33:23 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:203166 Archived-At: > Date: Thu, 21 Apr 2016 21:33:23 +0000 > Cc: dgutov@yandex.ru, emacs-devel@gnu.org > From: Alan Mackenzie > > I'll get a fuller reply to you later. But for now.... Thanks. > Given a buffer position, we need to be able to find the corresponding > island chain. "Obviously", we do this with a text property, which we > might as well call `island', or possibly `chain'. Why text properties? Have you considered a hash table? I think it will be faster, and will also avoid a few complications that text properties bring as baggage you don't necessarily want (like what happens when you copy text to another location or buffer).