]> git.donarmstrong.com Git - dactyl.git/blobdiff - common/modules/options.jsm
Import r6948 from upstream hg supporting Firefox up to 24.*
[dactyl.git] / common / modules / options.jsm
index 1440e23cd6e7b0ad6d5dc4abc944db69fed729ce..ac5ceb98cb7ef4400d9c0728e0363a661def1cc5 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
 // Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
-// Copyright (c) 2008-2011 by Kris Maglione <maglione.k@gmail.com>
+// Copyright (c) 2008-2013 by Kris Maglione <maglione.k@gmail.com>
 //
 // This work is licensed for reuse under an MIT license. Details are
 // given in the LICENSE.txt file included with this file.
@@ -258,7 +258,7 @@ var Option = Class("Option", {
         return null;
     },
 
-    // Properties {{{2
+    // Properties {{{
 
     /** @property {string} The option's canonical name. */
     name: null,
@@ -400,7 +400,8 @@ var Option = Class("Option", {
     hasChanged: false,
 
     /**
-     * Returns the timestamp when the option's value was last changed.
+     * @property {number} Returns the timestamp when the option's value was
+     *     last changed.
      */
     get lastSet() options.store.get(this.name).time,
     set lastSet(val) { options.store.set(this.name, { value: this.globalValue, time: Date.now() }); },
@@ -411,6 +412,7 @@ var Option = Class("Option", {
      */
     setFrom: null
 
+    //}}}
 }, {
     /**
      * @property {number} Global option scope.
@@ -906,8 +908,6 @@ var Options = Module("options", {
          * @optional
          */
         add: function add(names, description, type, defaultValue, extraInfo) {
-            const self = this;
-
             if (!util.isDactyl(Components.stack.caller))
                 deprecated.warn(add, "options.add", "group.options.add");
 
@@ -925,7 +925,7 @@ var Options = Module("options", {
                 this.remove(name);
             }
 
-            let closure = function () self._optionMap[name];
+            let closure = () => this._optionMap[name];
 
             memoize(this._optionMap, name, function () Option.types[type](modules, names, description, defaultValue, extraInfo));
             for (let alias in values(names.slice(1)))
@@ -1566,4 +1566,4 @@ endModule();
 
 } catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); }
 
-// vim: set fdm=marker sw=4 ts=4 et ft=javascript:
+// vim: set fdm=marker sw=4 sts=4 ts=8 et ft=javascript: