     shortcuts.removeListener 'change', @bound 'handleShortcutChange'
     emmetLoadListeners[@id] = null  unless _.isNull emmetLoadListeners
 
+    @_commandFns = null
+
     super
 
 

      .join '-'


  toCommand = (model, exec) ->

    # given a keyconfig model json and a callback, converts it to
    # conform to the ace command spec.
    #
    # see: https://github.com/ajaxorg/ace/blob/v1.1.4/lib/ace/commands/default_commands.js

    binding = model.binding[0]

    # since shortcuts#change emits a raw keyconfig.Model, binding prop might include
    # all bindings for all platforms.
    # in that case we need to get platform bindings explicitly:
    if _.isArray binding
      { shortcuts } = kd.singletons
      binding = shortcuts.getPlatformBinding(model)[0]

          else
            @emit.bind this, 'FindAndReplaceViewRequested', replace

    exec or= @_commandFns[model.name]
    @editor.commands.addCommand toCommand(model, exec)


  setEditorListeners: ->

    { shortcuts } = kd.singletons
    shortcuts.on 'change', @bound 'handleShortcutChange'

    @editor.getSession().selection.on 'changeCursor', (cursor) =>
      return if @suppressListeners
