code: function makeHistory(startGen) {
      return {
        // Arrays of history events. Doing something adds an event to
        // done and clears undo. Undoing moves events from done to
        // undone, redoing moves them in the other direction.
        done: [], undone: [], undoDepth: Infinity,
        // Used to track when changes can be merged into a single undo
        // event
        lastTime: 0, lastOp: null, lastOrigin: null,
        // Used by the isClean() method
        generation: startGen || 1, maxGeneration: startGen || 1
      };
    }
docs: HISTORY