From cd3364197f2738888f9d5a11ac946421d5496123 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 29 May 2009 14:46:50 +1000 Subject: [PATCH] Fix some minor function formatting faux pas. --- common/content/buffer.js | 8 +++++--- common/content/completion.js | 2 +- common/content/events.js | 6 +++--- common/content/io.js | 3 ++- common/content/util.js | 3 ++- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 8cea0ca3..e203c58d 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -149,8 +149,10 @@ function Buffer() //{{{ ////////////////////// OPTIONS ///////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ - function getWebNav() { - function call(val, fn) { + function getWebNav() + { + function call(val, fn) + { try { return fn(val); @@ -182,7 +184,7 @@ function Buffer() //{{{ PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val); getWebNav().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE); } - catch (e) { liberator.reportError(e) } + catch (e) { liberator.reportError(e); } }, completer: function (context) completion.charset(context), validator: Option.validateCompleter diff --git a/common/content/completion.js b/common/content/completion.js index 071cfab2..e8308e44 100644 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -340,7 +340,7 @@ CompletionContext.prototype = { let [k, v] = i; let _k = "_" + k; if (typeof v == "string" && /^[.[]/.test(v)) - v = eval("(function(i) i" + v + ")") + v = eval("(function (i) i" + v + ")") if (typeof v == "function") res.__defineGetter__(k, function () _k in this ? this[_k] : (this[_k] = v(this.item))); else diff --git a/common/content/events.js b/common/content/events.js index ef1018a8..ff201923 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -627,7 +627,7 @@ function Events() //{{{ ////////////////////// MAPPINGS //////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ - liberator.registerObserver("load_mappings", function() { + liberator.registerObserver("load_mappings", function () { mappings.add(modes.all, ["", ""], "Focus content", function () { events.onEscape(); }); @@ -872,9 +872,9 @@ function Events() //{{{ yield match[0]; }, - canonKeys: function(keys) + canonKeys: function (keys) { - var res = util.map(events.splitKeys(keys), function(key) { + var res = util.map(events.splitKeys(keys), function (key) { let keyCode = 0; if (key[0] == "<") diff --git a/common/content/io.js b/common/content/io.js index 09e51da1..5101a886 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -736,7 +736,8 @@ function IO() //{{{ writeFile: function (file, buf, mode, perms, encoding) { let ofstream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream); - function getStream(defaultChar) { + function getStream(defaultChar) + { let stream = Cc["@mozilla.org/intl/converter-output-stream;1"].createInstance(Ci.nsIConverterOutputStream); stream.init(ofstream, encoding, 0, defaultChar); return stream; diff --git a/common/content/util.js b/common/content/util.js index efe8d5c1..466afb35 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -433,7 +433,8 @@ const util = { //{{{ let elem = object; if (elem.nodeType == elem.TEXT_NODE) return elem.data; - function namespaced(node) { + function namespaced(node) + { var ns = NAMESPACES[node.namespaceURI]; if (ns) return ns + ":" + node.localName;