diff --git a/common/content/buffer.js b/common/content/buffer.js index 316be720..0f026db0 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -125,9 +125,9 @@ function Buffer() //{{{ // Holds option: [function, title] to generate :pageinfo sections var pageInfo = {}; - function addPageInfoSection(option, title, fn) + function addPageInfoSection(option, title, func) { - pageInfo[option] = [fn, title]; + pageInfo[option] = [func, title]; } function openUploadPrompt(elem) @@ -1013,7 +1013,7 @@ function Buffer() //{{{ * @param {string} option The section's value in 'pageinfo'. * @param {string} title The heading for this section's * output. - * @param {function} fn The function to generate this + * @param {function} func The function to generate this * section's output. */ addPageInfoSection: addPageInfoSection, diff --git a/common/content/io.js b/common/content/io.js index 1888a19f..d2bd5806 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -1181,24 +1181,24 @@ lookup: /** * Creates a temporary file context for executing external commands. - * fn is called with a temp file, created with + * func is called with a temp file, created with * {@link #createTempFile}, for each explicit argument. Ensures that - * all files are removed when fn returns. + * all files are removed when func returns. * - * @param {function} fn The function to execute. - * @param {Object} self The 'this' object used when executing fn. + * @param {function} func The function to execute. + * @param {Object} self The 'this' object used when executing func. * @returns {boolean} false if temp files couldn't be created, - * otherwise, the return value of fn. + * otherwise, the return value of func. */ - withTempFiles: function (fn, self) + withTempFiles: function (func, self) { - let args = util.map(util.range(0, fn.length), this.createTempFile); + let args = util.map(util.range(0, func.length), this.createTempFile); if (!args.every(util.identity)) return false; try { - return fn.apply(self || this, args); + return func.apply(self || this, args); } finally { diff --git a/common/content/liberator.js b/common/content/liberator.js index 7ddadf2b..2e009250 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -724,8 +724,8 @@ const liberator = (function () //{{{ triggerObserver: function (type) { let args = Array.slice(arguments, 1); - for (let [,fn] in Iterator(observers[type] || [])) - fn.apply(null, args); + for (let [,func] in Iterator(observers[type] || [])) + func.apply(null, args); }, /** diff --git a/common/content/options.js b/common/content/options.js index 29cbfc5e..d38c0509 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -1353,22 +1353,22 @@ function Options() //{{{ }, /** - * Executes fn with a new preference context. When fn + * Executes func with a new preference context. When func * returns, the context is popped and any preferences set via * {@link #setPref} or {@link #invertPref} are restored to their * previous values. * - * @param {function} fn The function to call. - * @param {Object} fn The 'this' object with which to call fn + * @param {function} func The function to call. + * @param {Object} func The 'this' object with which to call func * @see #pushContext * @see #popContext */ - withContext: function (fn, self) + withContext: function (func, self) { try { this.pushContext(); - return fn.call(self); + return func.call(self); } finally { diff --git a/common/content/template.js b/common/content/template.js index eb3090fa..ae0ff09d 100644 --- a/common/content/template.js +++ b/common/content/template.js @@ -12,7 +12,7 @@ const template = { //{{{ add: function add(a, b) a + b, join: function join(c) function (a, b) a + c + b, - map: function map(iter, fn, sep, interruptable) + map: function map(iter, func, sep, interruptable) { if (iter.length) // FIXME: Kludge? iter = util.Array.itervalues(iter); @@ -20,7 +20,7 @@ const template = { //{{{ let n = 0; for each (let i in Iterator(iter)) { - let val = fn(i); + let val = func(i); if (val == undefined) continue; if (sep && n++) diff --git a/common/content/ui.js b/common/content/ui.js index e2b4ab1c..e7b1acf2 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -1039,13 +1039,13 @@ function CommandLine() //{{{ }); }, - runSilently: function (fn, self) + runSilently: function (func, self) { let wasSilent = this.silent; this.silent = true; try { - fn.call(self); + func.call(self); } finally { diff --git a/common/content/util.js b/common/content/util.js index 2f92ae2e..5659532a 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -372,18 +372,18 @@ const util = { //{{{ }), /** - * Returns the array that results from applying fn to each property - * of obj. + * Returns the array that results from applying func to each + * property of obj. * * @param {Object} obj - * @param {function} fn + * @param {function} func * @returns {Array} */ - map: function map(obj, fn) + map: function map(obj, func) { let ary = []; for (let i in Iterator(obj)) - ary.push(fn(i)); + ary.push(func(i)); return ary; },