From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: make-field suggestion Date: Wed, 08 Sep 2004 10:25:26 +0900 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=euc-jp Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1094606786 25028 80.91.224.253 (8 Sep 2004 01:26:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Sep 2004 01:26:26 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 08 03:26:18 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C4rE2-0002dZ-00 for ; Wed, 08 Sep 2004 03:26:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4rJH-0002o1-KJ for ged-emacs-devel@m.gmane.org; Tue, 07 Sep 2004 21:31:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C4rJB-0002nw-A4 for emacs-devel@gnu.org; Tue, 07 Sep 2004 21:31:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C4rJ9-0002nk-Qg for emacs-devel@gnu.org; Tue, 07 Sep 2004 21:31:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4rJ9-0002nh-NX for emacs-devel@gnu.org; Tue, 07 Sep 2004 21:31:35 -0400 Original-Received: from [202.32.8.202] (helo=tyo202.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C4rDR-0007eV-RU; Tue, 07 Sep 2004 21:25:42 -0400 Original-Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.192]) by tyo202.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id i881PW214364; Wed, 8 Sep 2004 10:25:32 +0900 (JST) Original-Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id i881PWU21624; Wed, 8 Sep 2004 10:25:32 +0900 (JST) Original-Received: from edtmg01.lsi.nec.co.jp ([10.26.16.201]) by mailsv3.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id i881PVP27432; Wed, 8 Sep 2004 10:25:31 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edtmg01.lsi.nec.co.jp (8.12.10/8.12.10) with ESMTP id i881PTPn010914; Wed, 8 Sep 2004 10:25:30 +0900 (JST) Original-Received: from mctpc71 (mctpc71.ucom.lsi.nec.co.jp [10.30.118.121]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id i881PSwt023881; Wed, 8 Sep 2004 10:25:28 +0900 (JST) Original-Received: by mctpc71 (Postfix, from userid 31295) id 6ECEF421; Wed, 8 Sep 2004 10:25:27 +0900 (JST) Original-To: Jerry James System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Jerry James's message of "Tue, 07 Sep 2004 10:32:46 -0500") Original-Lines: 28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.devel:26874 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26874 Jerry James writes: > The reason for having a make-field function is to complete the > abstraction. It is almost possible to treat fields as abstract data > types using field-beginning, etc., but it is not possible to create them > without breaking the abstraction. I think some attention should be paid to the issue of creating text-property fields vs. overlay fields -- both are useful in different circumstances, so any `make-field' function should allow creating both (or there should be multiple `make...field' functions). For instance, in my `button' package, I have both `make-button', which makes an overlay button, and `make-text-button', which makes a text-property button (and the interface is otherwise the same). The documentation for `make-text-button' says in part: This function is like `make-button', except that the button is actually part of the text instead of being a property of the buffer. Creating large numbers of buttons can also be somewhat faster using `make-text-button'. I'll try to look at some code and get an idea in what cases different types of fields are created. -Miles --=20 =BC=AB=A4=E9=A4=F2=B6=F5=A4=CB=A4=B7=A4=C6=A1=A2=BF=B4=A4=F2=B3=AB=A4=AF=BB= =FE=A1=A2=C6=BB=A4=CF=B3=AB=A4=AB=A4=EC=A4=EB