No need for declaring a nested ``addCommands`` function:

```javascript
    addCommands: function(commands) {
        var e = this.aceEditor,
            handler = e.commands;

        function lookupCommand(keySpec) {
            keySpec.split('|').detect(function(keys) {
                var binding = handler.parseKeys(keys),
                    command = handler.findKeyCommand(binding.hashId, binding.key);
                return command && command.name;
            });
            //FIXME: Why is lookupCommand not returning anything? Looks like a bug to me.
        }

        commands.each(function(cmd) {
            var keys = cmd.bindKey && (cmd.bindKey[handler.platform] || cmd.bindKey),
                existing = keys && lookupCommand(keys);
            if (existing) handler.removeCommand(existing);
        });
        handler.addCommands(commands);
    },
```