emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make-field suggestion


From: Miles Bader
Subject: Re: make-field suggestion
Date: Wed, 08 Sep 2004 10:25:26 +0900

Jerry James <address@hidden> 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
-- 
自らを空にして、心を開く時、道は開かれる




reply via email to

[Prev in Thread] Current Thread [Next in Thread]