1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 08:42:28 +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

@@ -957,7 +957,7 @@ var CommandLine = Module("commandline", {
}
this.savingOutput = true;
dactyl.trapErrors.apply(dactyl, [fn, self].concat(args));
apply(dactyl, "trapErrors", [fn, self].concat(args));
this.savingOutput = false;
return output.map(elem => elem instanceof Node ? DOM.stringify(elem) : elem)
.join("\n");
@@ -1755,7 +1755,7 @@ var CommandLine = Module("commandline", {
return Events.PASS;
});
let bind = function bind(...args) mappings.add.apply(mappings, [[modes.COMMAND_LINE]].concat(args));
let bind = function bind(...args) apply(mappings, "add", [[modes.COMMAND_LINE]].concat(args));
bind(["<Esc>", "<C-[>"], "Stop waiting for completions or exit Command Line mode",
function ({ self }) {