1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 09:45:46 +01:00

Remove more unused vars.

This commit is contained in:
Doug Kearns
2015-04-25 23:57:57 +10:00
parent cd48d1b90b
commit 52993ec781
22 changed files with 29 additions and 50 deletions

View File

@@ -216,7 +216,6 @@ var Bookmarks = Module("bookmarks", {
* use in completion functions.
*/
get searchEngines() {
let searchEngines = [];
let aliases = {};
return iter(services.browserSearch.getVisibleEngines({})).map(function ([, engine]) {
let alias = engine.alias;
@@ -430,7 +429,7 @@ var Bookmarks = Module("bookmarks", {
const tags = {
names: ["-tags", "-T"],
description: "A comma-separated list of tags",
completer: function tags(context, args) {
completer: function tags(context) {
context.generate = function () Ary(b.tags
for (b of bookmarkcache)
if (b.tags))

View File

@@ -1351,7 +1351,6 @@ var CommandLine = Module("commandline", {
return;
}
let value = this.editor.selection.focusNode.textContent;
this.saveInput();
if (this.itemList.visible)
@@ -1788,8 +1787,6 @@ var CommandLine = Module("commandline", {
if (self.completions)
self.completions.tabTimer.flush();
let command = commandline.command;
self.accepted = true;
return function () { modes.pop(); };
});

View File

@@ -846,7 +846,6 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
count = count || 1;
let caret = !dactyl.focusedElement;
let controller = buffer.selectionController;
while (count-- && modes.main == modes.VISUAL) {
if (caret)

View File

@@ -374,7 +374,6 @@ var Events = Module("events", {
commandline.quiet = quiet;
for (let evt_obj of DOM.Event.parse(keys)) {
let now = Date.now();
let key = DOM.Event.stringify(evt_obj);
for (let type of values(["keydown", "keypress", "keyup"])) {
let evt = update({}, evt_obj, { type: type });
@@ -1109,7 +1108,6 @@ var Events = Module("events", {
mappings.add([modes.COMMAND],
["<A-m>s", "<sleep>"], "Sleep for {count} milliseconds before continuing macro playback",
function ({ command, count }) {
let now = Date.now();
dactyl.assert(count, _("error.countRequired", command));
if (events.feedingKeys)
util.sleep(count);

View File

@@ -274,7 +274,7 @@ var History = Module("history", {
names: ["-sort", "-s"],
type: CommandOption.STRING,
description: "The sort order of the results",
completer: function (context, args) {
completer: function (context) {
context.compare = CompletionContext.Sort.unsorted;
return Ary.flatten([
"annotation",

View File

@@ -68,7 +68,6 @@ var ProcessorStack = Class("ProcessorStack", {
events.dbg("EXECUTE(" + this._result(result) + ", " + force + ") events:" + this.events.length
+ " processors:" + this.processors.length + " actions:" + this.actions.length);
let processors = this.processors;
let length = 1;
if (force)

View File

@@ -35,7 +35,7 @@ var MOW = Module("mow", {
events.listen(window, this, "windowEvents");
modules.mow = this;
let fontSize = DOM(document.documentElement).style.fontSize;
//let fontSize = DOM(document.documentElement).style.fontSize;
styles.system.add("font-size", "dactyl://content/buffer.xhtml",
// "body { font-size: " + fontSize + "; } \
"html|html > xul|scrollbar { visibility: collapse !important; }",

View File

@@ -75,7 +75,6 @@ var StatusLine = Module("statusline", {
*/$));
}
let _commandline = "if (window.dactyl) return dactyl.modules.commandline";
let prepend = [
["button", { id: "appmenu-button", label: "", image: "chrome://branding/content/icon16.png", highlight: "AppmenuButton", xmlns: "xul" }],
["toolbarbutton", { id: "appmenu-toolbar-button", label: "", image: "chrome://branding/content/icon16.png" }],

View File

@@ -666,7 +666,7 @@ var Tabs = Module("tabs", {
{
argCount: "?",
count: true,
completer: function (context, args) {
completer: function (context) {
context.filters.push(({ item }) => item.tab.pinned);
completion.buffer(context);
}
@@ -819,7 +819,7 @@ var Tabs = Module("tabs", {
commands.add(["quita[ll]", "qa[ll]"],
"Quit this " + config.appName + " window",
function (args) { window.close(); },
function () { window.close(); },
{ argCount: "0" });
commands.add(["reloada[ll]"],
@@ -850,7 +850,7 @@ var Tabs = Module("tabs", {
}, {
argCount: "1",
bang: true,
completer: function (context, args) completion.buffer(context, true),
completer: function (context) completion.buffer(context, true),
literal: 0
});
@@ -1008,10 +1008,9 @@ var Tabs = Module("tabs", {
commands.add(["undoa[ll]"],
"Undo closing of all closed tabs",
function (args) {
function () {
for (let i of iter(tabs.closedTabs))
window.undoCloseTab(0);
},
{ argCount: "0" });