1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-19 01:55:47 +01:00

Remove unnecessary use of values() when iterating over arrays.

This commit is contained in:
Doug Kearns
2015-05-11 23:56:31 +10:00
parent a8e70d3f43
commit 48acf656ec
27 changed files with 81 additions and 80 deletions

View File

@@ -38,7 +38,7 @@ var AutoCmdHive = Class("AutoCmdHive", Contexts.Hive, {
if (!callable(pattern))
pattern = Group.compileFilter(pattern);
for (let event of values(events))
for (let event of events)
this._store.push(AutoCommand(event, pattern, cmd));
},
@@ -144,10 +144,10 @@ var AutoCommands = Module("autocommands", {
var { uri, doc } = buffer;
event = event.toLowerCase();
for (let hive of values(this.matchingHives(uri, doc))) {
for (let hive of this.matchingHives(uri, doc)) {
let args = hive.makeArgs(doc, null, arguments[1]);
for (let autoCmd of values(hive._store))
for (let autoCmd of hive._store)
if (autoCmd.eventName === event && autoCmd.filter(uri, doc)) {
if (!lastPattern || lastPattern !== String(autoCmd.filter))
dactyl.echomsg(_("autocmd.executing", event, autoCmd.filter), 8);