Skip to content

Commit a374ceb

Browse files
committed
Merge pull request #40 from Segaja/fix_let_statements
start to fix let statements to make vimp compatible with FF 35.0a1
2 parents 05bc85f + c28529b commit a374ceb

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

common/content/commandline.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1464,9 +1464,9 @@ const CommandLine = Module("commandline", {
14641464
commands.add([command.name],
14651465
command.description,
14661466
function (args) {
1467-
var str = args.literalArg;
1467+
let str = args.literalArg;
14681468

1469-
let str = CommandLine.echoArgumentToString(str, true);
1469+
str = CommandLine.echoArgumentToString(str, true);
14701470
if (str != null)
14711471
command.action(str);
14721472
}, {

common/content/commands.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,8 @@ const Commands = Module("commands", {
548548
var onlyArgumentsRemaining = allowUnknownOptions || (options.length == 0 && subCommands.length == 0) || false; // after a -- has been found
549549
var arg = null;
550550
var count = 0; // the length of the argument
551+
var quote = null;
552+
var error = null;
551553
var i = 0;
552554
var completeOpts;
553555

@@ -692,7 +694,7 @@ const Commands = Module("commands", {
692694
}
693695

694696
// if not an option, treat this token as an argument
695-
let [count, arg, quote, error] = getNextArg(sub);
697+
[count, arg, quote, error] = getNextArg(sub);
696698
liberator.assert(!error, error);
697699

698700
if (complete) {

common/content/liberator.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1717,9 +1717,9 @@ const Liberator = Module("liberator", {
17171717
return void liberator.echoerr("No usage information for: " + args[0]);
17181718

17191719
if (args[0])
1720-
var usage = template.genericOutput(config.name + " Usage", usage[args[0]]());
1720+
usage = template.genericOutput(config.name + " Usage", usage[args[0]]());
17211721
else
1722-
var usage = template.genericOutput(config.name + " Usage", xml`${ usage["mappings"]() }<br/>${ usage["commands"]() }<br/>${ usage["options"]()}`);
1722+
usage = template.genericOutput(config.name + " Usage", xml`${ usage["mappings"]() }<br/>${ usage["commands"]() }<br/>${ usage["options"]()}`);
17231723
liberator.echo(usage, commandline.FORCE_MULTILINE);
17241724
}, {
17251725
argCount: "?",

common/content/options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ const Option = Class("Option", {
123123
else
124124
scope = this.scope;
125125

126+
let value;
126127
// Options with a custom getter are always responsible for returning a meaningful value
127128
if (this.getter)
128129
return liberator.trapErrors(this.getter, this, value);
129130

130-
let value;
131131
if (liberator.has("tabs") && (scope & Option.SCOPE_LOCAL))
132132
value = tabs.options[this.name];
133133
if ((scope & Option.SCOPE_GLOBAL) && (value == undefined))

0 commit comments

Comments
 (0)