diff --git a/common/content/editor.js b/common/content/editor.js index accee372..0c8803ae 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -833,7 +833,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), { // add mappings for commands like h,j,k,l,etc. in CARET, VISUAL and TEXT_EDIT mode function addMovementMap(keys, description, hasCount, caretModeMethod, caretModeArg, textEditCommand, visualTextEditCommand) { - let extraInfo = { + let extra = { count: !!hasCount, type: "operator" }; @@ -872,7 +872,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), { } } }, - extraInfo); + extra); mappings.add([modes.CARET, modes.TEXT_EDIT, modes.OPERATOR], keys, description, function ({ count }) { @@ -885,7 +885,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), { caretExecute(false); } }, - extraInfo); + extra); } // add mappings for commands like i,a,s,c,etc. in TEXT_EDIT mode diff --git a/common/content/mappings.js b/common/content/mappings.js index 5946fdab..787b9930 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -439,7 +439,7 @@ var Mappings = Module("mappings", { * @param {string} description A description of the key mapping. * @param {function} action The action invoked by each key sequence. * @param {Object} extra An optional extra configuration hash (see - * {@link Map#extraInfo}). + * {@link Map#extra}). * @optional */ addUserMap: deprecated("group.mappings.add", function addUserMap() { diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index a2754fff..0ba1fb6e 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -113,8 +113,8 @@ update(CommandOption, { * command name prefix. * @param {string} description A short one line description of the command. * @param {function} action The action invoked by this command when executed. - * @param {Object} extraInfo An optional extra configuration hash. The - * following properties are supported. + * @param {Object} extra An optional extra configuration hash. The following + * properties are supported. * always - see {@link Command#always} * argCount - see {@link Command#argCount} * bang - see {@link Command#bang} @@ -131,19 +131,19 @@ update(CommandOption, { * @private */ var Command = Class("Command", { - init: function init(specs, description, action, extraInfo) { + init: function init(specs, description, action, extra) { specs = Array.concat(specs); // XXX this.specs = specs; this.description = description; this.action = action; - if (extraInfo.options) - this._options = extraInfo.options; - delete extraInfo.options; + if (extra.options) + this._options = extra.options; + delete extra.options; - if (extraInfo) - this.update(extraInfo); + if (extra) + this.update(extra); }, get toStringParams() { return [this.name, this.hive.name]; }, diff --git a/common/modules/options.jsm b/common/modules/options.jsm index 056d5a5a..70aa0d53 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -35,8 +35,8 @@ let ValueError = Class("ValueError", ErrorBase); * @param {string} description A short one line description of the option. * @param {string} type The option's value data type (see {@link Option#type}). * @param {string} defaultValue The default value for this option. - * @param {Object} extraInfo An optional extra configuration hash. The - * following properties are supported. + * @param {Object} extra An optional extra configuration hash. The following + * properties are supported. * completer - see {@link Option#completer} * domains - see {@link Option#domains} * getter - see {@link Option#getter} @@ -50,14 +50,14 @@ let ValueError = Class("ValueError", ErrorBase); * @private */ var Option = Class("Option", { - init: function init(modules, names, description, defaultValue, extraInfo) { + init: function init(modules, names, description, defaultValue, extra) { this.modules = modules; this.name = names[0]; this.realNames = names; this.description = description; - if (extraInfo) - this.update(extraInfo); + if (extra) + this.update(extra); this._defaultValue = defaultValue; @@ -836,8 +836,8 @@ var OptionHive = Class("OptionHive", Contexts.Hive, { this.has = v => hasOwnProperty(this.values, v); }, - add: function add(names, description, type, defaultValue, extraInfo) { - return this.modules.options.add(names, description, type, defaultValue, extraInfo); + add: function add(names, description, type, defaultValue, extra) { + return this.modules.options.add(names, description, type, defaultValue, extra); } }); @@ -952,20 +952,20 @@ var Options = Module("options", { * @param {string} type The option type (see {@link Option#type}). * @param {value} defaultValue The option's default value. * @param {Object} extra An optional extra configuration hash (see - * {@link Map#extraInfo}). + * {@link Map#extra}). * @optional */ - add: function add(names, description, type, defaultValue, extraInfo) { + add: function add(names, description, type, defaultValue, extra) { if (!util.isDactyl(Components.stack.caller)) deprecated.warn(add, "options.add", "group.options.add"); util.assert(type in Option.types, _("option.noSuchType", type), false); - if (!extraInfo) - extraInfo = {}; + if (!extra) + extra = {}; - extraInfo.definedAt = contexts.getCaller(Components.stack.caller); + extra.definedAt = contexts.getCaller(Components.stack.caller); let name = names[0]; if (name in this._optionMap) { @@ -976,12 +976,12 @@ var Options = Module("options", { let closure = () => this._optionMap[name]; memoize(this._optionMap, name, - () => Option.types[type](modules, names, description, defaultValue, extraInfo)); + () => Option.types[type](modules, names, description, defaultValue, extra)); for (let alias of names.slice(1)) memoize(this._optionMap, alias, closure); - if (extraInfo.setter && (!extraInfo.scope || extraInfo.scope & Option.SCOPE_GLOBAL)) + if (extra.setter && (!extra.scope || extra.scope & Option.SCOPE_GLOBAL)) if (this.dactyl.initialized) closure().initValue(); else