1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 04:35:46 +01:00

Cleanup crufty apply code.

This commit is contained in:
Kris Maglione
2015-02-21 22:43:41 -08:00
parent 7ee579200f
commit 1ee5668cac
26 changed files with 65 additions and 69 deletions

View File

@@ -596,7 +596,7 @@ var CommandHive = Class("CommandHive", Contexts.Hive, {
_add: function _add(names, description, action, extra={}, replace=false) {
const { contexts } = this.modules;
extra.definedAt = contexts.getCaller(Components.stack.caller.caller);
return this.add.apply(this, arguments);
return apply(this, "add", arguments);
},
/**
@@ -837,7 +837,7 @@ var Commands = Module("commands", {
group = this.user;
}
return group._add.apply(group, arguments);
return apply(group, "_add", arguments);
},
addUserCommand: deprecated("group.commands.add", { get: function addUserCommand() this.user.bound._add }),
getUserCommands: deprecated("iter(group.commands)", function getUserCommands() iter(this.user).toArray()),