1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 10:04:11 +01:00

Replace expression closures (command/option/mapping definitions).

Expression closures are to be axed. See https://bugzil.la/1083458.
This commit is contained in:
Doug Kearns
2015-07-23 01:15:41 +10:00
parent 85eede1ee2
commit 779752d776
33 changed files with 518 additions and 339 deletions

View File

@@ -628,8 +628,7 @@ var Styles = Module("Styles", {
if (args["-nopersist"] || !args["-append"] || style.persist === undefined)
style.persist = !args["-nopersist"];
}
},
{
}, {
completer: function (context, args) {
let sheet = args["-group"].get(args["-name"]);
if (args.completeArg == 0) {
@@ -654,8 +653,8 @@ var Styles = Module("Styles", {
nameFlag(),
{ names: ["-nopersist", "-N"], description: "Do not save this style to an auto-generated RC file" }
],
serialize: function ()
Ary(styles.hives)
serialize: function () {
return Ary(styles.hives)
.filter(hive => hive.persist)
.map(hive =>
hive.sheets.filter(style => style.persist)
@@ -670,7 +669,8 @@ var Styles = Module("Styles", {
"-name": style.name || undefined
}
})))
.flatten().array
.flatten().array;
}
});
[