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

Fix mode name generated for longer names in mapping serialization. Closes issue #565.

--HG--
extra : rebase_source : 115073fae6cf2a15692cac72df976e1eacf5298e
This commit is contained in:
Kris Maglione
2011-06-11 13:45:30 -04:00
parent c4c0ab7789
commit 3cc9ce2f8c
7 changed files with 40 additions and 16 deletions

View File

@@ -374,12 +374,19 @@ var Contexts = Module("contexts", {
bindMacro: function (args, default_, params) {
const { dactyl, events, modules } = this.modules;
function Proxy(obj, key) Class.Property({
configurable: true,
enumerable: true,
get: function Proxy_get() process(obj[key]),
set: function Proxy_set(val) obj[key] = val
})
let process = util.identity;
if (callable(params))
var makeParams = function makeParams(self, args)
iter.toObject([k, process(v)]
for ([k, v] in iter(params.apply(self, args))));
let (obj = params.apply(self, args))
iter.toObject([k, Proxy(obj, k)] for (k in properties(obj)));
else if (params)
makeParams = function makeParams(self, args)
iter.toObject([name, process(args[i])]