1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-12 08:05:46 +01:00

Merge default.

--HG--
branch : key-processing
This commit is contained in:
Kris Maglione
2011-01-27 01:45:07 -05:00
9 changed files with 65 additions and 55 deletions

View File

@@ -326,7 +326,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
if (typeof str == "object" && "echoerr" in str) if (typeof str == "object" && "echoerr" in str)
str = str.echoerr; str = str.echoerr;
else if (isinstance(str, ["Error"])) else if (isinstance(str, ["Error"]))
str = <>{str.fileName.replace(/^.*? -> /, "")}: {str.lineNumber}: {str}</>; str = <>{str.fileName.replace(/^.* -> /, "")}: {str.lineNumber}: {str}</>;
if (options["errorbells"]) if (options["errorbells"])
dactyl.beep(); dactyl.beep();

View File

@@ -45,15 +45,22 @@
<ul tag="features-list"></ul> <ul tag="features-list"></ul>
<h2 tag="contact">Contact</h2> <h2 tag="official-plugins">Official Plugins</h2>
<p>
In case you're not sufficiently overwhelmed by &dactyl.appName;'s default
feature set, don't despair. You can find more entertainment in the
officially supported (read: you can flame us when they stop working)
<link topic="&dactyl.plugins;">plugins</link>.
</p>
<h2 tag="contact bugs">Contact</h2>
<p> <p>
Please send comments, questions, or patches to the Please send comments, questions, or patches to the
<link topic="&dactyl.list.href;">mailing list</link>, <link topic="&dactyl.list.href;">mailing list</link>,
where we will do our best to answer any inquiries. You can also where we will do our best to answer any inquiries. You can also
check the find more information on the <link topic="&dactyl.home;">homepage</link>.
<link topic="http://code.google.com/p/dactyl/wiki">wiki</link> or
<link topic="&dactyl.faq;">FAQ</link>.
Issue reports can be entered in the Issue reports can be entered in the
<link topic="&dactyl.issues;">issue tracker</link>. <link topic="&dactyl.issues;">issue tracker</link>.
</p> </p>

View File

@@ -46,7 +46,7 @@
</p> </p>
<p tag=":map-modes"> <p tag=":map-modes">
Standard key mapping commands are provided for the four most Standard key mapping commands are provided for the five most
common modes, common modes,
</p> </p>
@@ -65,6 +65,7 @@
prefixed with one of the above letters. For instance, prefixed with one of the above letters. For instance,
<ex>:imap</ex> creates a new key mapping in insert mode, while <ex>:imap</ex> creates a new key mapping in insert mode, while
<ex>:cunmap</ex> removes a key mapping from command-line mode. <ex>:cunmap</ex> removes a key mapping from command-line mode.
Other modes can be specified using the -modes option described below.
</p> </p>
<warning> <warning>

View File

@@ -443,8 +443,8 @@
</item> </item>
<item> <item>
<tags>'cookieaccept' 'ca'</tags> <tags>'ca' 'cookieaccept'</tags>
<spec>'cookieaccept'</spec> <spec>'cookieaccept' 'ca'</spec>
<type>string</type> <type>string</type>
<default>all</default> <default>all</default>
<description> <description>
@@ -575,7 +575,7 @@
<item> <item>
<tags>'enc' 'encoding'</tags> <tags>'enc' 'encoding'</tags>
<spec>'encoding'</spec> <spec>'encoding' 'enc'</spec>
<type>string</type> <type>string</type>
<default>UTF-8</default> <default>UTF-8</default>
<description> <description>
@@ -602,7 +602,7 @@
<item> <item>
<tags>'ei' 'eventignore'</tags> <tags>'ei' 'eventignore'</tags>
<spec>'eventignore'</spec> <spec>'eventignore' 'ei'</spec>
<type>stringlist</type> <type>stringlist</type>
<default></default> <default></default>
<description> <description>
@@ -658,7 +658,7 @@
<item> <item>
<tags>'fenc' 'fileencoding'</tags> <tags>'fenc' 'fileencoding'</tags>
<spec>'fileencoding'</spec> <spec>'fileencoding' 'fenc'</spec>
<type>string</type> <type>string</type>
<default>UTF-8</default> <default>UTF-8</default>
<description> <description>
@@ -671,7 +671,7 @@
<item> <item>
<tags>'fc' 'findcase'</tags> <tags>'fc' 'findcase'</tags>
<spec>'findcase'</spec> <spec>'findcase' 'fc'</spec>
<type>string</type> <type>string</type>
<default>smart</default> <default>smart</default>
<description> <description>
@@ -939,6 +939,7 @@
</item> </item>
<item> <item>
<tags>'nojsd' 'nojsdebugger'</tags>
<tags>'jsd' 'jsdebugger'</tags> <tags>'jsd' 'jsdebugger'</tags>
<spec>'jsdebugger' 'jsd'</spec> <spec>'jsdebugger' 'jsd'</spec>
<type>boolean</type> <type>boolean</type>
@@ -951,8 +952,8 @@
</item> </item>
<item> <item>
<tags>'nolpl' 'lpl'</tags> <tags>'nolpl' 'noloadplugins'</tags>
<tags>'noloadplugins' 'loadplugins'</tags> <tags>'lpl' 'loadplugins'</tags>
<spec>'loadplugins' 'lpl'</spec> <spec>'loadplugins' 'lpl'</spec>
<type>regexplist</type> <type>regexplist</type>
<default>'\.(js|&dactyl.fileExt;)$'</default> <default>'\.(js|&dactyl.fileExt;)$'</default>
@@ -991,7 +992,7 @@
<item> <item>
<tags>'ml' 'mapleader'</tags> <tags>'ml' 'mapleader'</tags>
<spec>'mapleader'</spec> <spec>'mapleader' 'ml'</spec>
<type>string</type> <type>string</type>
<default>\</default> <default>\</default>
<description> <description>
@@ -1247,8 +1248,8 @@
</item> </item>
<item> <item>
<tags>'sanitizeshutdown' 'ss'</tags> <tags>'ss' 'sanitizeshutdown'</tags>
<spec>'sanitizeshutdown'</spec> <spec>'sanitizeshutdown' 'ss'</spec>
<type>stringlist</type> <type>stringlist</type>
<default/> <default/>
<description> <description>
@@ -1296,7 +1297,7 @@
</item> </item>
<item> <item>
<tags>'shell' 'sh'</tags> <tags>'sh' 'shell'</tags>
<spec>'shell' 'sh'</spec> <spec>'shell' 'sh'</spec>
<type>string</type> <type>string</type>
<default type="plain"><em>$SHELL</em> or <str>sh</str>, Windows: <str>cmd.exe</str></default> <default type="plain"><em>$SHELL</em> or <str>sh</str>, Windows: <str>cmd.exe</str></default>
@@ -1306,7 +1307,7 @@
</item> </item>
<item> <item>
<tags>'shellcmdflag' 'shcf'</tags> <tags>'shcf' 'shellcmdflag'</tags>
<spec>'shellcmdflag' 'shcf'</spec> <spec>'shellcmdflag' 'shcf'</spec>
<strut/> <strut/>
<type>string</type> <type>string</type>
@@ -1392,6 +1393,7 @@
</item> </item>
<item> <item>
<tags>'notmo' 'notimeout'</tags>
<tags>'tmo' 'timeout'</tags> <tags>'tmo' 'timeout'</tags>
<spec>'timeout' 'tmo'</spec> <spec>'timeout' 'tmo'</spec>
<type>boolean</type> <type>boolean</type>
@@ -1435,7 +1437,7 @@
<item> <item>
<tags>'us' 'urlsep' 'urlseparator'</tags> <tags>'us' 'urlsep' 'urlseparator'</tags>
<spec>'urlseparator'</spec> <spec>'urlseparator' 'urlsep' 'us'</spec>
<type>string</type> <type>string</type>
<default>\|</default> <default>\|</default>
<description> <description>
@@ -1533,7 +1535,7 @@
</item> </item>
<item> <item>
<tags>'wildignore' 'wig'</tags> <tags>'wig' 'wildignore'</tags>
<spec>'wildignore' 'wig'</spec> <spec>'wildignore' 'wig'</spec>
<type>regexplist</type> <type>regexplist</type>
<default></default> <default></default>

View File

@@ -232,17 +232,6 @@ var Addon = Class("Addon", {
} }
}); });
iter.forEach(properties(config.addon), function (prop) {
let desc = Object.getOwnPropertyDescriptor(config.addon, prop);
if (callable(desc.value))
Addon.prototype[prop] = function proxy() this.addon[prop].apply(this.addon, arguments);
else
Object.defineProperty(Addon.prototype, prop, {
get: function get_proxy() this.addon[prop],
set: function set_proxy(val) this.addon[prop] = val
});
});
var AddonList = Class("AddonList", { var AddonList = Class("AddonList", {
init: function init(modules, types, filter) { init: function init(modules, types, filter) {
this.modules = modules; this.modules = modules;
@@ -533,6 +522,17 @@ var addonErrors = array.toObject([
endModule(); endModule();
iter.forEach(properties(config.addon), function (prop) {
let desc = Object.getOwnPropertyDescriptor(config.addon, prop);
if (callable(desc.value))
Addon.prototype[prop] = function proxy() this.addon[prop].apply(this.addon, arguments);
else
Object.defineProperty(Addon.prototype, prop, {
get: function get_proxy() this.addon[prop],
set: function set_proxy(val) this.addon[prop] = val
});
});
} catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } } catch(e){ if (isString(e)) 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 ts=4 et ft=javascript:

View File

@@ -83,7 +83,7 @@ var CompletionContext = Class("CompletionContext", {
self.waitingForTab = false; self.waitingForTab = false;
delete self._generate; delete self._generate;
delete self._ignoreCase; delete self.ignoreCase;
if (self != this) if (self != this)
return self; return self;
["_caret", "contextList", "maxItems", "onUpdate", "selectionTypes", "tabPressed", "updateAsync", "value"].forEach(function (key) { ["_caret", "contextList", "maxItems", "onUpdate", "selectionTypes", "tabPressed", "updateAsync", "value"].forEach(function (key) {
@@ -305,7 +305,7 @@ var CompletionContext = Class("CompletionContext", {
get filter() this._filter != null ? this._filter : this.value.substr(this.offset, this.caret), get filter() this._filter != null ? this._filter : this.value.substr(this.offset, this.caret),
set filter(val) { set filter(val) {
delete this._ignoreCase; delete this.ignoreCase;
return this._filter = val; return this._filter = val;
}, },
@@ -401,18 +401,15 @@ var CompletionContext = Class("CompletionContext", {
this.noUpdate = false; this.noUpdate = false;
}, },
get ignoreCase() { ignoreCase: Class.memoize(function () {
if (this._ignoreCase == null) { let mode = this.wildcase;
let mode = this.wildcase; if (mode == "match")
if (mode == "match") return false;
this._ignoreCase = false; else if (mode == "ignore")
if (mode == "ignore") return true;
this._ignoreCase = true; else
this._ignoreCase = !/[A-Z]/.test(this.filter); return !/[A-Z]/.test(this.filter);
} }),
return this._ignoreCase;
},
set ignoreCase(val) this._ignoreCase = val,
/** /**
* Returns a list of all completion items which match the current * Returns a list of all completion items which match the current
@@ -578,7 +575,7 @@ var CompletionContext = Class("CompletionContext", {
* @param {number} count The number of characters to advance the context. * @param {number} count The number of characters to advance the context.
*/ */
advance: function advance(count) { advance: function advance(count) {
delete this._ignoreCase; delete this.ignoreCase;
let advance = count; let advance = count;
if (this.quote && count) { if (this.quote && count) {
advance = this.quote[1](this.filter.substr(0, count)).length; advance = this.quote[1](this.filter.substr(0, count)).length;

View File

@@ -124,6 +124,7 @@ var ConfigBase = Class("ConfigBase", {
}), }),
dtd: memoize({ dtd: memoize({
get name() config.name,
get home() "http://dactyl.sourceforge.net/", get home() "http://dactyl.sourceforge.net/",
get apphome() this.home + this.name, get apphome() this.home + this.name,
code: "http://code.google.com/p/dactyl/", code: "http://code.google.com/p/dactyl/",

View File

@@ -124,7 +124,7 @@ var Services = Module("Services", {
* @param {string} class The class's contract ID. * @param {string} class The class's contract ID.
* @param {nsISupports|nsISupports[]} ifaces The interface or array of * @param {nsISupports|nsISupports[]} ifaces The interface or array of
* interfaces implemented by this service. * interfaces implemented by this service.
* @param {string} meth The name of the function used to instanciate * @param {string} meth The name of the function used to instantiate
* the service. * the service.
*/ */
add: function (name, class_, ifaces, meth) { add: function (name, class_, ifaces, meth) {
@@ -138,9 +138,11 @@ var Services = Module("Services", {
* Adds a new XPCOM class to the cache. * Adds a new XPCOM class to the cache.
* *
* @param {string} name The class's cache key. * @param {string} name The class's cache key.
* @param {string} class The class's contract ID. * @param {string} class_ The class's contract ID.
* @param {nsISupports|nsISupports[]} ifaces The interface or array of * @param {nsISupports|nsISupports[]} ifaces The interface or array of
* interfaces implemented by this class. * interfaces implemented by this class.
* @param {string} init Name of a property or method used to initialise the
* class. See {@link #_create}.
*/ */
addClass: function (name, class_, ifaces, init) { addClass: function (name, class_, ifaces, init) {
const self = this; const self = this;

View File

@@ -75,7 +75,7 @@
listing keys for modes other than Normal, filtering the output listing keys for modes other than Normal, filtering the output
and linking to source code locations). [b4] and linking to source code locations). [b4]
- :downloads now opens a download list in the multi-line output - :downloads now opens a download list in the multi-line output
buffer. buffer. [b6]
- Added :mapgroup command and -group flag to :map, :unmap, and - Added :mapgroup command and -group flag to :map, :unmap, and
:mapclear. [b6] :mapclear. [b6]
- :extensions has been replaced with a more powerful :addons. - :extensions has been replaced with a more powerful :addons.
@@ -99,10 +99,10 @@
- Added :write !cmd and :write >>file. [b3] - Added :write !cmd and :write >>file. [b3]
- Added :yank command. [b3] - Added :yank command. [b3]
- :delmarks, :marks and :qmarks now also accept ranges, same as - :delmarks, :marks and :qmarks now also accept ranges, same as
:delqmarks. :delqmarks. [b4]
- :command now accepts comma-separated alternative command names. - :command now accepts comma-separated alternative command names. [b4]
- :command -complete custom now also accepts a completions array, see - :command -complete custom now also accepts a completions array, see
:h :command-completion-custom. :h :command-completion-custom. [b4]
* Improvements to :style and :highlight: * Improvements to :style and :highlight:
- Added -link flag to :highlight. [b4] - Added -link flag to :highlight. [b4]
- Added -agent flag to :style. [b2] - Added -agent flag to :style. [b2]
@@ -138,8 +138,8 @@
* IMPORTANT: Plugins are now loaded from the 'plugins/' * IMPORTANT: Plugins are now loaded from the 'plugins/'
directory in 'runtimepath' rather than 'plugin/'. [b1] directory in 'runtimepath' rather than 'plugin/'. [b1]
* Option changes: * Option changes:
- Added "bookmarks", "diverted", and "links" to 'activate' [b2] - Added "bookmarks", "diverted", and "links" to 'activate'
option. option. [b2]
- Added 'altwildmode' and c_<A-Tab> command-line key binding. [b2] - Added 'altwildmode' and c_<A-Tab> command-line key binding. [b2]
- Added 'autocomplete' option for specifying which completion - Added 'autocomplete' option for specifying which completion
groups should be auto-completed. [b2] groups should be auto-completed. [b2]