1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 10:57:58 +01:00

Fix some "for each" iteration of arrays.

This commit is contained in:
Doug Kearns
2009-06-17 16:22:53 +10:00
parent baf423de14
commit e5c6d58a88
6 changed files with 7 additions and 7 deletions

View File

@@ -92,9 +92,9 @@ function Bookmarks() //{{{
this.__defineGetter__("bookmarks", function () this.load());
this.__defineGetter__("keywords",
function () [new Keyword(k.keyword, k.title, k.icon, k.url) for each (k in self.bookmarks) if (k.keyword)]);
function () [new Keyword(k.keyword, k.title, k.icon, k.url) for ([,k] in Iterator(self.bookmarks)) if (k.keyword)]);
this.__iterator__ = function () (val for each (val in self.bookmarks));
this.__iterator__ = function () (val for ([,val] in Iterator(self.bookmarks)));
function loadBookmark(node)
{

View File

@@ -1945,7 +1945,7 @@ function Marks() //{{{
Math.round(mark[1].position.x * 100) + "%",
Math.round(mark[1].position.y * 100) + "%",
mark[1].location]
for each (mark in marks)));
for ([,mark] in Iterator(marks))));
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
}

View File

@@ -1091,7 +1091,7 @@ function Commands() //{{{
cmd.count ? "0c" : "",
completerToString(cmd.completer),
cmd.replacementText || "function () { ... }"]
for each (cmd in cmds)));
for ([,cmd] in Iterator(cmds))));
commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
}

View File

@@ -164,7 +164,7 @@ function Hints() //{{{
return [elem.value, false];
else
{
for each (let option in options["hintinputs"].split(","))
for (let [,option] in Iterator(options["hintinputs"].split(",")))
{
if (option == "value")
{

View File

@@ -1050,7 +1050,7 @@ const liberator = (function () //{{{
}
liberator.echomsg('Searching for "plugin/**/*.{js,vimp}" in "'
+ [dir.path.replace(/.plugin$/, "") for each (dir in dirs)].join(",") + '"', 2);
+ [dir.path.replace(/.plugin$/, "") for ([,dir] in Iterator(dirs))].join(",") + '"', 2);
dirs.forEach(function (dir) {
liberator.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3);

View File

@@ -509,7 +509,7 @@ let (array = util.Array)
catch (e) {}
context.fork("others", 0, this, function (context) {
context.title = ["Site"];
context.completions = [[s, ""] for each (s in styles.sites)];
context.completions = [[s, ""] for ([,s] in Iterator(styles.sites))];
});
}
});