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, 8 Sep 2004 18:44:51 -0400
User-agent: Mutt/1.3.28i

On Wed, Sep 08, 2004 at 05:26:22PM -0500, Jerry James wrote:
> > 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).
> 
> That makes sense.  How about something like this?
> 
> (defun make-field (from to value &optional buffer front-advance rear-advance
>                  use-text-props)

The question remains which should be the default -- most current uses of
fields use text properties; perhaps this is not the right thing, but it's
worth considering.

> I'm not sure what this function could usefully return.  It ought to
> return a reference to a field object, but there is no such thing.

In the button package the text-property variants just return the position of
the first character, since for text properties that's usable as a handle to
get at the properties (the various abstract button- operations know how to
deal with both positions and overlays).

Since all current field functions use the buffer position anyway, this should
work for both overlays and text-properties.

-Miles
-- 
`Life is a boundless sea of bitterness'




reply via email to

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