Next: , Previous: , Up: Extents   [Contents][Index]


47.8 Extent Parents

An extent can have a parent extent set for it. If this is the case, the extent derives all its properties from that extent and has no properties of its own. The only “properties” that the extent keeps are the buffer or string it refers to and the start and end points. More correctly, the extent’s own properties are shadowed. If you later change the extent to have no parent, its own properties will become visible again.

It is possible for an extent’s parent to itself have a parent, and so on. Through this, a whole tree of extents can be created, all deriving their properties from one root extent. Note, however, that you cannot create an inheritance loop—this is explicitly disallowed.

Parent extents are used to implement the extents over the modeline.

Function: set-extent-parent extent parent

This function sets the parent of extent to parent. If parent is nil, the extent is set to have no parent.

Function: extent-parent extent

This function return the parents (if any) of extent, or nil.

Function: extent-children extent

This function returns a list of the children (if any) of extent. The children of an extent are all those extents whose parent is that extent. This function does not recursively trace children of children.

Function: extent-descendants extent

This function returns a list of all descendants of extent, including extent. This recursively applies extent-children to any children of extent, until no more children can be found.


Next: , Previous: , Up: Extents   [Contents][Index]