Next / Previous / Contents / Shipman's homepage

5.18. ibp-field-object: Location of an actual field

An object of this type describes the location of an actual field in an actual record (unlike a ibp-field-def, which talks about field positions within an arbitrary tail). It has three attributes:


Position of the first character in the field, as an emacs position type.


Position just past the last character in the field. If the field is incomplete, this is the position just after the completed part.


For fields whose default content is spaces, this is nil; otherwise it is the default content from the appropriate ibp-field-def.

Here's the definition:

;; - - - - -   c l a s s   i b p - f i e l d - o b j e c t

(defun ibp-field-object (beg end filler)
  "Constructor for a field object, representing the location of a field.

    [ if (beg is the position of the start of a field)
      and (end is the position of the end of a field, which may be
      beyond the end of its line)
      and (filler is the default contents of the field, or nil if
      the default is blank) ->
        return an ibp-field-object representing those values ]
  (vector beg end filler))

These accessor functions extract the components of the object:

(defun ibp-field-beg    (ibp-field-object) (elt ibp-field-object 0))
(defun ibp-field-end    (ibp-field-object) (elt ibp-field-object 1))
(defun ibp-field-filler (ibp-field-object) (elt ibp-field-object 2))