         }
 
       # serializeCommandTable(@commandTable)
-      for name, spec of @commandTable when spec.isCommand
-        @subscriptions.add(registerCommandFromSpec(spec))
-      @subscriptions
+      subs = registerCommandFromTable(@commandTable)
+      console.timeEnd('register and gen-cmd-table') if isDevMode
+      subs
+
+    return readTableAndRegisterCommands()
+    # return registerCommandOldStyle()
+    # return registerAndGenerateCommandTable()
 
   registries = {Base}
   @extend: (@command=true) ->

} = require './utils'
swrap = require './selection-wrapper'

Input = null
selectList = null
getEditorState = null # set by Base.init()
CSON = null
LazyLoadedLibs = {}

serializeCommandTable = (specByKlass) ->
  CSON ?= require 'season'
  data = CSON.stringify(specByKlass)
  CommandTablePath = require.resolve('./command-table.cson')
  atom.workspace.open(CommandTablePath).then (editor) ->
    editor.setText(data)

      filenameByKlass = {}
      for file in files
        beforeRequire = _.keys(@getRegistries())
        require(file)
        afterRequire = _.keys(@getRegistries())
        for klass in _.difference(afterRequire, beforeRequire)
          filenameByKlass[klass] = file

      for __, klass of @getRegistries()
        @commandTable[klass.name] = spec = {
          name: klass.name
          file: filenameByKlass[klass.name]
