mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-31 01:55:46 +01:00
Experimentally move commands.js and options.js to modules. Fix some bugs.
--HG-- branch : groups rename : common/content/commands.js => common/modules/commands.jsm rename : common/content/options.js => common/modules/options.jsm
This commit is contained in:
@@ -748,16 +748,17 @@ unlet s:cpo_save
|
||||
return lines.map(function (l) l.join("")).join("\n").replace(/\s+\n/gm, "\n");
|
||||
}
|
||||
|
||||
const { commands, options } = modules;
|
||||
file.write(template({
|
||||
name: config.name,
|
||||
autocommands: wrap("syn keyword " + config.name + "AutoEvent ",
|
||||
keys(config.autocommands)),
|
||||
commands: wrap("syn keyword " + config.name + "Command ",
|
||||
array(c.specs for (c in commands)).flatten()),
|
||||
array(c.specs for (c in commands.iterator())).flatten()),
|
||||
options: wrap("syn keyword " + config.name + "Option ",
|
||||
array(o.names for (o in modules.options) if (o.type != "boolean")).flatten()),
|
||||
array(o.names for (o in options) if (o.type != "boolean")).flatten()),
|
||||
toggleoptions: wrap("let s:toggleOptions = [",
|
||||
array(o.realNames for (o in modules.options) if (o.type == "boolean"))
|
||||
array(o.realNames for (o in options) if (o.type == "boolean"))
|
||||
.flatten().map(String.quote),
|
||||
", ") + "]"
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user