emacs-devel
[Top][All Lists]
Advanced

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

Re: make-field suggestion


From: Jerry James
Subject: Re: make-field suggestion
Date: Tue, 07 Sep 2004 10:32:46 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux)

Richard Stallman <address@hidden>, on Wed, 01 Sep 2004 at 00:57:24 -0400
you wrote:
>     I would like to suggest the make-field interface for Emacs.  The Emacs
>     version would look something like this, if defaulting to text properties
>     is okay:
>
>     (defun make-field (from to value &optional buffer)
>       "Make a field with value VALUE over the range [FROM, TO) in BUFFER.
>     BUFFER defaults to the current buffer."
>       (with-current-buffer (or buffer (current-buffer))
>       (put-text-property from to 'field value)))
>
> We can certainly install something like this, once it is clear what is
> best.  It depends, I suppose, on how someone would plan to use it.

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.

Regards,
-- 
Jerry James
http://www.ittc.ku.edu/~james/




reply via email to

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