A great majority of the files that you open in a text editor such as XEmacs contain two kinds of material: text that only you can write (source code, composed natural language etc.) and markup that can largely be guessed, computed or automated (headers, footers, copyright notices, timestamps etc.)
FCM, the File Contents Manager, is an XEmacs library designed to help you with the latter kind of material. FCM works by associating the files you write with so-called templates. Templates not only provide initial, possibly dynamic contents for new files but are also used to establish a structural match with existing files, so that you can automatically update the templated contents at different times such as loading, saving, or upon explicit request.
Template files mostly contain plain text. When FCM encounters plain text in a template, it just copies it as-is to the file you're creating. Template files may also contain so-called template variables which allow you to manage contents dynamically. This comes in handy for inserting timestamps, copyright years, choosing a specific license etc. When FCM encounters a variable in a template file, it evaluates it in order to produce the actual contents to insert; a process known as variable expansion.
Template variables are said to be automatic when they expand to their value directly (as a timestamp for instance). Another kind of variable is the interactive ones. Interactive variables prompt you for some information everytime they need to be expanded (as a file tagline for instance).
FCM comes with a set of predefined templates but you can also create and use your own.
While its most frequent use is probably to provide initial contents for newly created files, FCM can act at other moments too. Apart from initialization, FCM will act at load time, save time and update time, that is, upon explicit request. By using so-called variable modifiers, template variables can be made to expand automatically at those different times, in addition to when a file is created. Finally, you can also explicitely request re-expansion of any variable at any time, hence dynamically updating the templated contents.