1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 09:27:59 +01:00

add more missing semicolons

This commit is contained in:
Doug Kearns
2007-11-11 03:01:55 +00:00
parent 434844b688
commit c362c70f03
16 changed files with 95 additions and 95 deletions

View File

@@ -330,7 +330,7 @@ vimperator.Bookmarks = function () //{{{
};
//}}}
} //}}}
}; //}}}
vimperator.History = function () //{{{
{
@@ -484,7 +484,7 @@ vimperator.History = function () //{{{
};
//}}}
} //}}}
}; //}}}
vimperator.Marks = function () //{{{
{
@@ -743,7 +743,7 @@ vimperator.Marks = function () //{{{
};
//}}}
} //}}}
}; //}}}
vimperator.QuickMarks = function () //{{{
{
@@ -852,6 +852,6 @@ vimperator.QuickMarks = function () //{{{
}
};
//}}}
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -326,7 +326,7 @@ vimperator.Buffer = function () //{{{
if (frame.document.body.localName.toLowerCase() == "body")
frames.push(frame);
for (var i = 0; i < frame.frames.length; i++)
arguments.callee(frame.frames[i])
arguments.callee(frame.frames[i]);
})(window.content);
if (frames.length == 0) // currently top is always included
@@ -735,6 +735,6 @@ vimperator.Buffer = function () //{{{
};
//}}}
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -57,7 +57,7 @@ vimperator.Command = function (specs, action, extra_info) //{{{
}
}
return { names: names, long_names: long_names, short_names: short_names };
}
};
this.specs = specs;
var expanded_specs = parseSpecs(specs);
@@ -88,12 +88,12 @@ vimperator.Command = function (specs, action, extra_info) //{{{
this.args = extra_info.args || [];
}
}
};
vimperator.Command.prototype.execute = function (args, special, count, modifiers)
{
return this.action.call(this, args, special, count, modifiers);
}
};
// return true if the candidate name matches one of the command's aliases
// (including all acceptable abbreviations)
@@ -124,7 +124,7 @@ vimperator.Command.prototype.hasName = function (name)
}
}
return false;
}
};
//}}}
vimperator.Commands = function () //{{{
@@ -151,7 +151,7 @@ vimperator.Commands = function () //{{{
vimperator.Commands.prototype[command.name] = function (args, special, count, modifiers)
{
command.execute(args, special, count, modifiers);
}
};
}
// in '-quoted strings, only ' and \ itself are escaped
@@ -455,7 +455,7 @@ vimperator.Commands = function () //{{{
this.__iterator__ = function ()
{
return commandsIterator();
}
};
this.add = function (command)
{
@@ -465,7 +465,7 @@ vimperator.Commands = function () //{{{
ex_commands.push(command);
return true;
}
};
this.get = function (name)
{
@@ -476,7 +476,7 @@ vimperator.Commands = function () //{{{
}
return null;
}
};
// TODO: generalized 0 count handling -> "Zero count"
// FIXME: doesn't really belong here...
@@ -519,7 +519,7 @@ vimperator.Commands = function () //{{{
matches[3] = "";
return matches;
}
};
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// DEFAULT COMMANDS ////////////////////////////////////////
@@ -1108,7 +1108,7 @@ vimperator.Commands = function () //{{{
return;
}
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/)
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
var [lhs, rhs] = [matches[1], matches[2]];
if (rhs)
vimperator.editor.addAbbreviation("!", lhs, rhs);
@@ -1132,7 +1132,7 @@ vimperator.Commands = function () //{{{
return;
}
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/)
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
var [lhs, rhs] = [matches[1], matches[2]];
if (rhs)
vimperator.editor.addAbbreviation("c", lhs, rhs);
@@ -1154,7 +1154,7 @@ vimperator.Commands = function () //{{{
return;
}
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/)
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
var [lhs, rhs] = [matches[1], matches[2]];
if (rhs)
vimperator.editor.addAbbreviation("i", lhs, rhs);
@@ -1239,7 +1239,7 @@ vimperator.Commands = function () //{{{
}
}
addDefaultCommand(new vimperator.Command(["map"],
function (args) { map(args, false) },
function (args) { map(args, false); },
{
usage: ["map {lhs} {rhs}", "map {lhs}", "map"],
short_help: "Map the key sequence {lhs} to {rhs}",
@@ -1355,7 +1355,7 @@ vimperator.Commands = function () //{{{
line += abbrCmd;
// source a user .vimperatorrc file
line += "\nsource! " + filename + ".local\n"
line += "\nsource! " + filename + ".local\n";
line += "\n\" vim: set ft=vimperator:";
vimperator.io.writeFile(file, line);
@@ -1399,7 +1399,7 @@ vimperator.Commands = function () //{{{
));
// TODO: remove duplication in :map
addDefaultCommand(new vimperator.Command(["no[remap]"],
function (args) { map(args, true) },
function (args) { map(args, true); },
{
usage: ["no[remap] {lhs} {rhs}", "no[remap] {lhs}", "no[remap]"],
short_help: "Map the key sequence {lhs} to {rhs}",
@@ -2334,6 +2334,6 @@ vimperator.Commands = function () //{{{
}
));
//}}}
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -359,7 +359,7 @@ vimperator.Completion = function () // {{{
get_sidebar_completions: function (filter) //{{{
{
g_substrings = [];
var menu = document.getElementById("viewSidebarMenu")
var menu = document.getElementById("viewSidebarMenu");
var nodes = [];
for (var i = 0; i < menu.childNodes.length; i++)
@@ -611,6 +611,6 @@ vimperator.Completion = function () // {{{
} //}}}
};
} // }}}
}; // }}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -643,6 +643,6 @@ vimperator.Editor = function () //{{{
} //}}}
};
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -260,7 +260,7 @@ vimperator.Events = function () //{{{
window.removeEventListener("keypress", this.onKeyPress, true);
window.removeEventListener("keydown", this.onKeyDown, true);
}
};
// This method pushes keys into the event queue from vimperator
// it is similar to vim's feedkeys() method, but cannot cope with
@@ -326,7 +326,7 @@ vimperator.Events = function () //{{{
evt.noremap = noremap;
elem.dispatchEvent(evt);
}
}
};
// this function converts the given event to
// a keycode which can be used in mappings
@@ -406,16 +406,16 @@ vimperator.Events = function () //{{{
// a key like F1 is always enclosed in < and >
return "<" + modifier + key + ">";
} //}}}
}; //}}}
this.isAcceptKey = function (key)
{
return (key == "<Return>" || key == "<C-j>" || key == "<C-m>");
}
};
this.isCancelKey = function (key)
{
return (key == "<Esc>" || key == "<C-[>" || key == "<C-c>");
}
};
// argument "event" is delibarately not used, as i don't seem to have
// access to the real focus target
@@ -460,7 +460,7 @@ vimperator.Events = function () //{{{
vimperator.modes.reset();
}, 10);
}
}
};
this.onSelectionChange = function (event)
{
@@ -485,7 +485,7 @@ vimperator.Events = function () //{{{
// if (!could_copy && vimperator.modes.extended & vimperator.modes.CARET)
// vimperator.mode = vimperator.modes.CARET;
//}
}
};
// global escape handler, is called in ALL modes
this.onEscape = function ()
@@ -545,7 +545,7 @@ vimperator.Events = function () //{{{
vimperator.focusContent(true);
}
}
}
};
// this keypress handler gets always called first, even if e.g.
// the commandline has focus
@@ -728,7 +728,7 @@ vimperator.Events = function () //{{{
var motion_map = (vimperator.input.pendingMotionMap && vimperator.input.pendingMotionMap.names[0]) || "";
vimperator.statusline.updateInputBuffer(motion_map + vimperator.input.buffer);
return false;
}
};
window.addEventListener("keypress", this.onKeyPress, true);
// this is need for sites like msn.com which focus the input field on keydown
@@ -739,7 +739,7 @@ vimperator.Events = function () //{{{
event.stopPropagation();
return false;
}
};
window.addEventListener("keydown", this.onKeyUpOrDown, true);
window.addEventListener("keyup", this.onKeyUpOrDown, true);
@@ -872,10 +872,10 @@ vimperator.Events = function () //{{{
break;
}
}
}
};
this.prefObserver.register();
//}}}
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -260,6 +260,6 @@ vimperator.Search = function () //{{{
}
};
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -286,6 +286,6 @@ vimperator.help = function (section, easter) //{{{
window.content.scrollTo(0, pos[1]);
}
}, 0);
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -682,7 +682,7 @@ vimperator.Hints = function () //{{{
processHints(followFirst);
}
return;
}
};
// FIXME: add resize support
// window.addEventListener("resize", onResize, null);
@@ -695,6 +695,6 @@ vimperator.Hints = function () //{{{
// doc = window.content.document;
// }
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -235,6 +235,6 @@ vimperator.IO = function ()
ofstream.close();
}
};
}
};
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -63,7 +63,7 @@ vimperator.Map = function (modes, cmds, action, extra_info) //{{{
this.cancel_mode = extra_info.cancel_mode || false;
this.always_active = extra_info.always_active || false;
}
}
};
vimperator.Map.prototype.hasName = function (name)
{
@@ -74,7 +74,7 @@ vimperator.Map.prototype.hasName = function (name)
}
return false;
}
};
// Since we will add many Map-objects, we add some functions as prototypes
// this will ensure we only have one copy of each function, not one for each object
@@ -89,7 +89,7 @@ vimperator.Map.prototype.execute = function (motion, count, argument)
args.push(argument);
return this.action.apply(this, args);
}
};
//}}}
vimperator.Mappings = function () //{{{
@@ -187,19 +187,19 @@ vimperator.Mappings = function () //{{{
this.__iterator__ = function ()
{
return mappingsIterator(vimperator.modes.NORMAL, main);
}
};
// FIXME
this.getIterator = function (mode)
{
return mappingsIterator(mode, main);
}
};
// FIXME
this.getUserIterator = function (mode)
{
return mappingsIterator(mode, user);
}
};
this.hasMap = function (mode, cmd)
{
@@ -212,7 +212,7 @@ vimperator.Mappings = function () //{{{
}
return false;
}
};
this.add = function (map)
{
@@ -226,17 +226,17 @@ vimperator.Mappings = function () //{{{
for (var k = 0; k < map.modes.length; k++)
user[map.modes[k]].push(map);
}
};
this.remove = function (mode, cmd)
{
removeMap(mode, cmd);
}
};
this.removeAll = function (mode)
{
user[mode] = [];
}
};
this.get = function (mode, cmd)
{
@@ -246,13 +246,13 @@ vimperator.Mappings = function () //{{{
map = getMap(mode, cmd, main);
return map;
}
};
// TODO: move default maps to their own v.normal namespace
this.getDefaultMap = function (mode, cmd)
{
return getMap(mode, cmd, main);
}
};
// returns an array of mappings with names which start with "cmd"
this.getCandidates = function (mode, cmd)
@@ -277,7 +277,7 @@ vimperator.Mappings = function () //{{{
}
return matches;
}
};
this.list = function (mode, filter)
{
@@ -297,14 +297,14 @@ vimperator.Mappings = function () //{{{
list += "<tr>";
list += "<td> " + vimperator.util.escapeHTML(maps[i].names[j]) + "</td>";
if (maps[i].rhs)
list += "<td> " + vimperator.util.escapeHTML(maps[i].rhs) + "</td>"
list += "<td> " + vimperator.util.escapeHTML(maps[i].rhs) + "</td>";
list += "</tr>";
}
}
list += "</table>";
vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE);
}
};
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// DEFAULT MAPPINGS ////////////////////////////////////////
@@ -2014,6 +2014,6 @@ vimperator.Mappings = function () //{{{
//}}}
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -104,7 +104,7 @@ vimperator.Option = function (names, type, extra_info) //{{{
return true;
}
return false;
}
};
this.isValidValue = function (value)
{
@@ -112,13 +112,13 @@ vimperator.Option = function (names, type, extra_info) //{{{
return this.validator(value);
else
return true;
}
};
this.reset = function ()
{
this.value = this.default_value;
}
} //}}}
};
}; //}}}
vimperator.Options = function () //{{{
{
@@ -315,7 +315,7 @@ vimperator.Options = function () //{{{
this.__iterator__ = function ()
{
return optionsIterator();
}
};
this.get = function (name)
{
@@ -325,14 +325,14 @@ vimperator.Options = function () //{{{
return options[i];
}
return null;
}
};
this.add = function (option)
{
this.__defineGetter__(option.name, function () { return option.value; });
this.__defineSetter__(option.name, function (value) { option.value = value; });
options.push(option);
}
};
this.destroy = function ()
{
@@ -340,7 +340,7 @@ vimperator.Options = function () //{{{
if (loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit")
== popup_allowed_events + " keypress")
storePreference("dom.popup_allowed_events", popup_allowed_events);
}
};
this.list = function (only_non_default)
{
@@ -382,7 +382,7 @@ vimperator.Options = function () //{{{
list += "</table>";
vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE);
}
};
// this hack is only needed, because we need to do asynchronous loading of the .vimperatorrc
this.setInitialGUI = function ()
@@ -393,29 +393,29 @@ vimperator.Options = function () //{{{
this.get("laststatus").reset();
if (!showtabline_done)
this.get("showtabline").reset();
}
};
// TODO: separate Preferences from Options? Would these utility functions
// be better placed in the 'core' vimperator namespace somewhere?
this.setPref = function (name, value)
{
return storePreference(name, value, true);
}
};
this.getPref = function (name, forced_default)
{
return loadPreference(name, forced_default, true);
}
};
this.setFirefoxPref = function (name, value)
{
return storePreference(name, value);
}
};
this.getFirefoxPref = function (name, forced_default)
{
return loadPreference(name, forced_default);
}
};
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// DEFAULT OPTIONS /////////////////////////////////////////
@@ -424,7 +424,7 @@ vimperator.Options = function () //{{{
const DEFAULT_HINTTAGS = "//*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @class='s'] | " +
"//input[not(@type='hidden')] | //a | //area | //iframe | //textarea | //button | //select | " +
"//xhtml:*[@onclick or @onmouseover or @onmousedown or @onmouseup or @oncommand or @class='lk' or @class='s'] | " +
"//xhtml:input[not(@type='hidden')] | //xhtml:a | //xhtml:area | //xhtml:iframe | //xhtml:textarea | //xhtml:button | //xhtml:select"
"//xhtml:input[not(@type='hidden')] | //xhtml:a | //xhtml:area | //xhtml:iframe | //xhtml:textarea | //xhtml:button | //xhtml:select";
this.add(new vimperator.Option(["activate", "act"], "stringlist",
{
@@ -608,7 +608,7 @@ vimperator.Options = function () //{{{
"</ul>" +
"The order matters",
default_value: "gfm",
validator: function (value) { return !(/[^gfm]/.test(value) || value.length > 3 || value.length < 1) }
validator: function (value) { return !(/[^gfm]/.test(value) || value.length > 3 || value.length < 1); }
}
));
this.add(new vimperator.Option(["popups", "pps"], "number",
@@ -779,6 +779,6 @@ vimperator.Options = function () //{{{
setTitleString(this.titlestring);
setPopups(this.popups);
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -101,12 +101,12 @@ vimperator.Tabs = function () //{{{
}
return getBrowser().tabContainer.selectedIndex;
}
};
this.count = function ()
{
return getBrowser().mTabs.length;
}
};
// TODO: implement filter
// @returns an array of tabs which match filter
@@ -122,7 +122,7 @@ vimperator.Tabs = function () //{{{
buffers.push([number, title, uri]);
}
return buffers;
}
};
this.getTab = function (index)
{
@@ -130,7 +130,7 @@ vimperator.Tabs = function () //{{{
return getBrowser().mTabs[index];
return getBrowser().tabContainer.selectedItem;
}
};
/* spec == "" moves the tab to the last position as per Vim
* wrap causes the movement to wrap around the start and end of the tab list
@@ -144,7 +144,7 @@ vimperator.Tabs = function () //{{{
var index = indexFromSpec(spec, wrap);
getBrowser().moveTabTo(tab, index);
}
};
/* quit_on_last_tab = 1: quit without saving session
* quit_on_last_tab = 2: quit and save session
@@ -201,12 +201,12 @@ vimperator.Tabs = function () //{{{
for (; i >= index; i--)
removeOrBlankTab(this.getTab(i));
}
}
};
this.keepOnly = function (tab)
{
getBrowser().removeAllTabsBut(tab);
}
};
this.select = function (spec, wrap)
{
@@ -217,7 +217,7 @@ vimperator.Tabs = function () //{{{
return false;
}
getBrowser().mTabContainer.selectedIndex = index;
}
};
// TODO: when restarting a session FF selects the first tab and then the
// tab that was selected when the session was created. As a result the
@@ -227,7 +227,7 @@ vimperator.Tabs = function () //{{{
{
alternates = [this.getTab(), alternates[0]];
this.alternate = alternates[1];
}
};
// TODO: move to v.buffers
this.alternate = this.getTab();
@@ -244,7 +244,7 @@ vimperator.Tabs = function () //{{{
{
getBrowser().reloadTab(tab);
}
}
};
this.reloadAll = function (bypass_cache)
{
@@ -254,7 +254,7 @@ vimperator.Tabs = function () //{{{
{
try
{
this.reload(getBrowser().mTabs[i], bypass_cache)
this.reload(getBrowser().mTabs[i], bypass_cache);
}
catch (e)
{
@@ -267,8 +267,8 @@ vimperator.Tabs = function () //{{{
{
getBrowser().reloadAllTabs();
}
}
};
//}}}
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -838,7 +838,7 @@ vimperator.CommandLine = function () //{{{
};
//}}}
} //}}}
}; //}}}
/**
* The list which is used for the completion box, the preview window and the buffer preview window
@@ -1051,7 +1051,7 @@ vimperator.InformationList = function (id, options) //{{{
};
//}}}
} //}}}
}; //}}}
vimperator.StatusLine = function () //{{{
{
@@ -1135,7 +1135,7 @@ vimperator.StatusLine = function () //{{{
modified += "-";
if (modified)
url += " [" + modified + "]"
url += " [" + modified + "]";
url_widget.value = url;
},
@@ -1211,6 +1211,6 @@ vimperator.StatusLine = function () //{{{
};
//}}}
} //}}}
}; //}}}
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -182,10 +182,10 @@ vimperator.util = {
strNum[0] = strNum[0].substring(0, u) + "," + strNum[0].substring(u, strNum[0].length);
if (strNum[1])
strNum[0] += "." + strNum[1]
strNum[0] += "." + strNum[1];
return strNum[0];
}
}
};
// vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -753,7 +753,7 @@ const vimperator = (function () //{{{
thread.dispatch(new CallbackEvent(func, args), thread.DISPATCH_SYNC);
}
} //}}}
}; //}}}
})(); //}}}
// called when the chrome is fully loaded and before the main window is shown