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

declare some undeclared variables in parseOpt and whitespace fixes

This commit is contained in:
Doug Kearns
2008-10-15 01:55:27 +00:00
parent 7770adb4af
commit 1394f483e4
11 changed files with 30 additions and 24 deletions

View File

@@ -520,7 +520,7 @@ function Bookmarks() //{{{
].filter(function (i) i[1])
} for each (item in items)));
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
},
}
};
//}}}
}; //}}}
@@ -816,7 +816,7 @@ function History() //{{{
let list = template.bookmarks("title", (
{
title: item[1],
url: item[0],
url: item[0]
} for each (item in items)));
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
}

View File

@@ -266,7 +266,7 @@ function Buffer() //{{{
}
}
Styles.prototype = {
get sites() util.uniq(util.flatten([v.sites for ([k, v] in this.userSheets)])),
get sites() util.uniq(util.flatten([v.sites for ([k, v] in this.userSheets)]))
};
let styles = storage.newObject("styles", Styles, false);
@@ -887,7 +887,7 @@ function Buffer() //{{{
, filter)],
literal: true,
options: [[["-index", "-i"], commands.OPTION_INT],
[["-name", "-n"], commands.OPTION_STRING]],
[["-name", "-n"], commands.OPTION_STRING]]
});
commands.add(["hi[ghlight]"],
@@ -915,7 +915,7 @@ function Buffer() //{{{
argCount: 1,
bang: true,
hereDoc: true,
literal: true,
literal: true
});
commands.add(["vie[wsource]"],

View File

@@ -748,7 +748,7 @@ function Commands() //{{{
let filter = {
argCount: args["-nargs"],
bang: "-bang" in args && true,
count: args["-count"],
count: args["-count"]
};
let cmds = getMatchingUserCommands(cmd, filter);

View File

@@ -866,12 +866,17 @@ function Completion() //{{{
return mapped;
};
try {
if (tail)
return [dir.length, this.cached("file-" + dir, compl, generate, "filter", [true])];
else
return [0, this.cached("file", filter, generate, "filter", [true])];
}catch(e){liberator.dump(e)}
try
{
if (tail)
return [dir.length, this.cached("file-" + dir, compl, generate, "filter", [true])];
else
return [0, this.cached("file", filter, generate, "filter", [true])];
}
catch (e)
{
liberator.dump(e);
}
},
help: function help(filter)

View File

@@ -221,7 +221,7 @@ function Search() //{{{
aNode.appendChild(docfrag);
parent.insertBefore(aNode, before);
return aNode;
},
}
};
/////////////////////////////////////////////////////////////////////////////}}}

View File

@@ -101,7 +101,7 @@ const liberator = (function () //{{{
["b", "Bookmark bar"]
].concat(!liberator.has("tabs") ? [] : tabopts);
},
validator: function (value) Array.every(value, function (c) c in config.guioptions || tabopts.some(function (a) a[0] == c)),
validator: function (value) Array.every(value, function (c) c in config.guioptions || tabopts.some(function (a) a[0] == c))
});
options.add(["helpfile", "hf"],
@@ -333,7 +333,7 @@ const liberator = (function () //{{{
{
bang: true,
completer: function (filter) completion.javascript(filter),
hereDoc: true,
hereDoc: true
});
commands.add(["loadplugins", "lpl"],

View File

@@ -380,7 +380,7 @@ function Options() //{{{
},
{
argCount: "0",
bang: true,
bang: true
});
commands.add(["setl[ocal]"],
@@ -419,6 +419,7 @@ function Options() //{{{
function parseOpt(args, modifiers)
{
let ret = {};
let matches, prefix, postfix, valueGiven;
[matches, prefix, ret.name, postfix, valueGiven, ret.operator, ret.value] =
args.match(/^\s*(no|inv)?([a-z_]+)([?&!])?\s*(([-+^]?)=(.*))?\s*$/) || [];
@@ -893,7 +894,7 @@ function Options() //{{{
name: opt.name,
default: opt.defaultValue,
pre: "\u00a0\u00a0", /* Unicode nonbreaking space. */
value: <></>,
value: <></>
};
if (onlyNonDefault && option.isDefault)
@@ -942,7 +943,7 @@ function Options() //{{{
default: loadPreference(pref, null, true),
value: <>={template.highlight(value)}</>,
name: pref,
pre: "\u00a0\u00a0", /* Unicode nonbreaking space. */
pre: "\u00a0\u00a0" /* Unicode nonbreaking space. */
};
yield option;

View File

@@ -231,6 +231,6 @@ const template = {
</tr>)
}
</table>);
},
}
};

View File

@@ -1493,7 +1493,7 @@ function StatusLine() //{{{
const highlightGroup = {
secure: "StatusLineSecure",
broken: "StatusLineBroken",
insecure: "StatusLine",
insecure: "StatusLine"
};
statusBar.setAttribute("class", "chromeclass-status hl-" + highlightGroup[type]);

View File

@@ -436,7 +436,7 @@ const util = { //{{{
domnode.appendChild(arguments.callee(child, doc));
return domnode;
}
},
}
}; //}}}
function Struct()