function clearDocData(docpluginman) {
  return function () {
    // Clear all the specific document data:
    docpluginman.genPrivate.type[docpluginman.docType] = {}

    // Set back the default values:
    if (typeof docpluginman.defValuesFunc === 'function') {
      docpluginman.defValuesFunc(docpluginman)
    } // Endif.

    // Allow all the plugins to set their default data after clearing the document's data:
    docpluginman.emitEvent('setData', docpluginman.genobj)
  }
}
Clear all the information of the current document.

@param {object} docpluginman The plugin manager object.
@return Callback function to clear all the document's specific data.