[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. The save list

In a template, different elements can be saved for later with the function tempo-save-named on a data structure called the save list. The most obvious way to do this, is to supply a name argument to the (p ...) element or one of its likes, but it can also be done programmatically with an explicit call to tempo-save-named.

Every saved element is saved in the list tempo-named-insertions. After inserting a template, this list is cleared, so things saved in it does not live between insertions. You should use ordinary variables for that.

The following two functions could be used from inside a template.

Function: tempo-save-named name data
Save data on the save list under the name name. The function returns nil.

Function: tempo-lookup-named name
Lookup some saved data under the name name. Returns the data if name was found, and nil otherwise.

The following functions deal with the save list, but should be considered internal to tempo.

Function: tempo-insert-named name
Insert the previous insertion saved under a named specified in name. If there is no such name saved, a tempo mark is inserted.

Note that if the data is a string, it will not be run through the string processor.

Function: tempo-forget-insertions
Clears the save list.

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by XEmacs Webmaster on October, 2 2007 using texi2html