1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 21:15:47 +01:00

Get rid of most remaining comprehensions.

This commit is contained in:
Kris Maglione
2015-12-20 15:53:43 -08:00
parent 0aba8fb619
commit 916ea412a5
34 changed files with 372 additions and 256 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2008-2014 Kris Maglione <maglione.k at Gmail>
// Copyright (c) 2008-2015 Kris Maglione <maglione.k at Gmail>
// Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
//
// This work is licensed for reuse under an MIT license. Details are
@@ -1399,9 +1399,11 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
},
validator: function (value) {
this.format({}, value);
let allowed = new RealSet(["column", "file", "line"]);
return [k for (k of util.compileMacro(value).seen)]
.every(k => allowed.has(k));
return util.compileMacro(value)
.seen.difference(allowed)
.size == 0;
}
});