1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 11:27:58 +01:00

Automagically generate option types and default value entities for options.xml.

This commit is contained in:
Kris Maglione
2011-03-15 23:12:28 -04:00
parent 2d03f3f9ca
commit f1965c81ff
8 changed files with 167 additions and 145 deletions

View File

@@ -264,7 +264,8 @@ var StatusLine = Module("statusline", {
get bookmarked() this._bookmarked, get bookmarked() this._bookmarked,
set bookmarked(val) { set bookmarked(val) {
this._bookmarked = val; this._bookmarked = val;
this.status = this.status; if (this.status)
this.status = this.status;
}, },
updateStatus: function updateStatus() { updateStatus: function updateStatus() {

View File

@@ -211,6 +211,7 @@ plugin.searchingForIn-2 = Searching for %S in %S
plugin.notReplacingContext-1 = Not replacing plugin context for %S plugin.notReplacingContext-1 = Not replacing plugin context for %S
pref.prompt.resetAll-1 = Warning: Resetting all preferences may make %S unusable. Would you like to continue (yes/[no]): pref.prompt.resetAll-1 = Warning: Resetting all preferences may make %S unusable. Would you like to continue (yes/[no]):
pref.safeSet.warnChanged-1 = Warning: Setting preference %S, but it's changed from its default value.
print.toFile-1 = Printing to file: %S print.toFile-1 = Printing to file: %S
print.sending = Sending to printer... print.sending = Sending to printer...

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="dactyl://content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="dactyl://content/help.xsl"?>
<!DOCTYPE document SYSTEM "dactyl://content/dtd"> <!DOCTYPE document SYSTEM "dactyl://content/options.dtd">
<document <document
name="options" name="options"
@@ -329,7 +329,7 @@
<tags>'act' 'activate'</tags> <tags>'act' 'activate'</tags>
<strut/> <strut/>
<spec>'activate' 'act'</spec> <spec>'activate' 'act'</spec>
<type>stringlist</type> <type>&option.activate.type;</type>
<default>addons,bookmarks,diverted,downloads,extoptions, <default>addons,bookmarks,diverted,downloads,extoptions,
help,homepage,quickmark,tabopen,paste</default> help,homepage,quickmark,tabopen,paste</default>
<description> <description>
@@ -358,8 +358,8 @@
<item> <item>
<tags>'awim' 'altwildmode'</tags> <tags>'awim' 'altwildmode'</tags>
<spec>'altwildmode' 'awim'</spec> <spec>'altwildmode' 'awim'</spec>
<type>stringlist</type> <type>&option.altwildmode.type;</type>
<default>list:full</default> <default>&option.altwildmode.default;</default>
<description> <description>
<p> <p>
Like <o>wildmode</o>, but when the <k name="A-Tab" mode="c"/> key Like <o>wildmode</o>, but when the <k name="A-Tab" mode="c"/> key
@@ -371,8 +371,8 @@
<item> <item>
<tags>'au' 'autocomplete'</tags> <tags>'au' 'autocomplete'</tags>
<spec>'autocomplete' 'au'</spec> <spec>'autocomplete' 'au'</spec>
<type>regexplist</type> <type>&option.autocomplete.type;</type>
<default>.*</default> <default>&option.autocomplete.default;</default>
<description> <description>
<p> <p>
Enables automatic completion for completion contexts (see Enables automatic completion for completion contexts (see
@@ -413,8 +413,8 @@
<item> <item>
<tags>'bh' 'banghist'</tags> <tags>'bh' 'banghist'</tags>
<spec>'banghist' 'bh'</spec> <spec>'banghist' 'bh'</spec>
<type>boolean</type> <type>&option.banghist.type;</type>
<default>on</default> <default>&option.banghist.default;</default>
<description> <description>
<p> <p>
Replace occurrences of ! with the previous command when Replace occurrences of ! with the previous command when
@@ -427,7 +427,7 @@
<tags>$CDPATH</tags> <tags>$CDPATH</tags>
<tags>'cd' 'cdpath'</tags> <tags>'cd' 'cdpath'</tags>
<spec>'cdpath' 'cd'</spec> <spec>'cdpath' 'cd'</spec>
<type>stringlist</type> <type>&option.cdpath.type;</type>
<default type="plain">equivalent to <str>.</str> or <str>.,$CDPATH</str></default> <default type="plain">equivalent to <str>.</str> or <str>.,$CDPATH</str></default>
<description> <description>
<p> <p>
@@ -445,8 +445,8 @@
<item> <item>
<tags>'ca' 'cookieaccept'</tags> <tags>'ca' 'cookieaccept'</tags>
<spec>'cookieaccept' 'ca'</spec> <spec>'cookieaccept' 'ca'</spec>
<type>string</type> <type>&option.cookieaccept.type;</type>
<default>all</default> <default>&option.cookieaccept.default;</default>
<description> <description>
<p>When to accept cookies.</p> <p>When to accept cookies.</p>
@@ -461,8 +461,8 @@
<item> <item>
<tags>'cl' 'cookielifetime'</tags> <tags>'cl' 'cookielifetime'</tags>
<spec>'cookielifetime'</spec> <spec>'cookielifetime'</spec>
<type>string</type> <type>&option.cookielifetime.type;</type>
<default>default</default> <default>&option.cookielifetime.default;</default>
<description> <description>
<p> <p>
The lifetime for which to accept cookies. The available The lifetime for which to accept cookies. The available
@@ -482,7 +482,8 @@
<item> <item>
<tags>'ck' 'cookies'</tags> <tags>'ck' 'cookies'</tags>
<spec>'cookies' 'ck'</spec> <spec>'cookies' 'ck'</spec>
<type>stringlist</type> <default>session</default> <type>&option.cookies.type;</type>
<default>&option.cookies.default;</default>
<description> <description>
<p>The default action for the <ex>:cookies</ex> command.</p> <p>The default action for the <ex>:cookies</ex> command.</p>
</description> </description>
@@ -491,8 +492,8 @@
<item> <item>
<tags>'cpt' 'complete'</tags> <tags>'cpt' 'complete'</tags>
<spec>'complete' 'cpt'</spec> <spec>'complete' 'cpt'</spec>
<type>charlist</type> <type>&option.complete.type;</type>
<default>slf</default> <default>&option.complete.default;</default>
<description> <description>
<p>Items which are completed at the <ex>:open</ex> prompts. Available items:</p> <p>Items which are completed at the <ex>:open</ex> prompts. Available items:</p>
@@ -521,8 +522,8 @@
<item> <item>
<tags>'ds' 'defsearch'</tags> <tags>'ds' 'defsearch'</tags>
<spec>'defsearch' 'ds'</spec> <spec>'defsearch' 'ds'</spec>
<type>string</type> <type>&option.defsearch.type;</type>
<default>google</default> <default>&option.defsearch.default;</default>
<description> <description>
<p> <p>
Sets the default search engine. The default search engine is Sets the default search engine. The default search engine is
@@ -543,8 +544,8 @@
<item> <item>
<tags>'editor'</tags> <tags>'editor'</tags>
<spec>'editor'</spec> <spec>'editor'</spec>
<type>string</type> <type>&option.editor.type;</type>
<default><![CDATA[gvim -f +<line> <file>]]></default> <default>&option.editor.default;</default>
<description> <description>
<p> <p>
Set the external text editor. Set the external text editor.
@@ -576,8 +577,8 @@
<item> <item>
<tags>'enc' 'encoding'</tags> <tags>'enc' 'encoding'</tags>
<spec>'encoding' 'enc'</spec> <spec>'encoding' 'enc'</spec>
<type>string</type> <type>&option.encoding.type;</type>
<default>UTF-8</default> <default>&option.encoding.default;</default>
<description> <description>
<p> <p>
Changes the character encoding of the current buffer. Valid only Changes the character encoding of the current buffer. Valid only
@@ -590,8 +591,8 @@
<tags>'noeb' 'noerrorbells'</tags> <tags>'noeb' 'noerrorbells'</tags>
<tags>'eb' 'errorbells'</tags> <tags>'eb' 'errorbells'</tags>
<spec>'errorbells' 'eb'</spec> <spec>'errorbells' 'eb'</spec>
<type>boolean</type> <type>&option.errorbells.type;</type>
<default>off</default> <default>&option.errorbells.default;</default>
<description> <description>
<p> <p>
Ring the bell when an error message is displayed. See also Ring the bell when an error message is displayed. See also
@@ -603,8 +604,8 @@
<item> <item>
<tags>'ei' 'eventignore'</tags> <tags>'ei' 'eventignore'</tags>
<spec>'eventignore' 'ei'</spec> <spec>'eventignore' 'ei'</spec>
<type>stringlist</type> <type>&option.eventignore.type;</type>
<default></default> <default>&option.eventignore.default;</default>
<description> <description>
<p> <p>
A list of autocommand event names which should be ignored. If the A list of autocommand event names which should be ignored. If the
@@ -618,8 +619,8 @@
<tags>'noex' 'noexrc'</tags> <tags>'noex' 'noexrc'</tags>
<tags>'ex' 'exrc'</tags> <tags>'ex' 'exrc'</tags>
<spec>'exrc' 'ex'</spec> <spec>'exrc' 'ex'</spec>
<type>boolean</type> <type>&option.exrc.type;</type>
<default>off</default> <default>&option.exrc.default;</default>
<description> <description>
<p> <p>
Allow reading of an RC file in the current directory. This file is Allow reading of an RC file in the current directory. This file is
@@ -633,7 +634,7 @@
<tags>'eht' 'extendedhinttags'</tags> <tags>'eht' 'extendedhinttags'</tags>
<spec>'extendedhinttags' 'eht'</spec> <spec>'extendedhinttags' 'eht'</spec>
<strut/> <strut/>
<type>regexpmap</type> <type>&option.extendedhinttags.type;</type>
<default>[asOTivVWy]:a[href],area[href],img[src],iframe[src], <default>[asOTivVWy]:a[href],area[href],img[src],iframe[src],
[f]:body, [f]:body,
[F]:body,code,div,html,p,pre,span, [F]:body,code,div,html,p,pre,span,
@@ -652,8 +653,8 @@
<item> <item>
<tags>'fenc' 'fileencoding'</tags> <tags>'fenc' 'fileencoding'</tags>
<spec>'fileencoding' 'fenc'</spec> <spec>'fileencoding' 'fenc'</spec>
<type>string</type> <type>&option.fileencoding.type;</type>
<default>UTF-8</default> <default>&option.fileencoding.default;</default>
<description> <description>
<p> <p>
Changes the character encoding that &dactyl.appName; uses to read Changes the character encoding that &dactyl.appName; uses to read
@@ -665,8 +666,8 @@
<item> <item>
<tags>'fc' 'findcase'</tags> <tags>'fc' 'findcase'</tags>
<spec>'findcase' 'fc'</spec> <spec>'findcase' 'fc'</spec>
<type>string</type> <type>&option.findcase.type;</type>
<default>smart</default> <default>&option.findcase.default;</default>
<description> <description>
<p>Find case matching mode.</p> <p>Find case matching mode.</p>
@@ -681,8 +682,8 @@
<item> <item>
<tags>'fh' 'followhints'</tags> <tags>'fh' 'followhints'</tags>
<spec>'followhints' 'fh'</spec> <spec>'followhints' 'fh'</spec>
<type>number</type> <type>&option.followhints.type;</type>
<default>0</default> <default>&option.followhints.default;</default>
<description> <description>
<p>Changes how soon matching hints are followed in Hints mode.</p> <p>Changes how soon matching hints are followed in Hints mode.</p>
@@ -700,8 +701,8 @@
<tags>'nofs' 'nofullscreen'</tags> <tags>'nofs' 'nofullscreen'</tags>
<tags>'fs' 'fullscreen'</tags> <tags>'fs' 'fullscreen'</tags>
<spec>'fullscreen' 'fs'</spec> <spec>'fullscreen' 'fs'</spec>
<type>boolean</type> <type>&option.fullscreen.type;</type>
<default>off</default> <default>&option.fullscreen.default;</default>
<description> <description>
<p> <p>
Show the current window full-screen. Also hide certain GUI elements, such as Show the current window full-screen. Also hide certain GUI elements, such as
@@ -713,8 +714,8 @@
<item> <item>
<tags>'go' 'guioptions'</tags> <tags>'go' 'guioptions'</tags>
<spec>'guioptions' 'go'</spec> <spec>'guioptions' 'go'</spec>
<type>charlist</type> <type>&option.guioptions.type;</type>
<default>bCrs</default> <!-- TODO: make this config specific --> <default>&option.guioptions.default;</default>
<description> <description>
<p>Show or hide certain GUI elements.</p> <p>Show or hide certain GUI elements.</p>
@@ -745,8 +746,8 @@
<item> <item>
<tags>'hf' 'helpfile'</tags> <tags>'hf' 'helpfile'</tags>
<spec>'helpfile' 'hf'</spec> <spec>'helpfile' 'hf'</spec>
<type>string</type> <type>&option.helpfile.type;</type>
<default>intro</default> <default>&option.helpfile.default;</default>
<description> <description>
<p> <p>
Name of the main help file. This is that page shown if the Name of the main help file. This is that page shown if the
@@ -758,8 +759,8 @@
<item> <item>
<tags>'hin' 'hintinputs'</tags> <tags>'hin' 'hintinputs'</tags>
<spec>'hintinputs' 'hin'</spec> <spec>'hintinputs' 'hin'</spec>
<type>stringlist</type> <type>&option.hintinputs.type;</type>
<default>label,value</default> <default>&option.hintinputs.default;</default>
<description> <description>
<p> <p>
When generating hints for input elements that do not have an When generating hints for input elements that do not have an
@@ -779,8 +780,8 @@
<item> <item>
<tags>'hk' 'hintkeys'</tags> <tags>'hk' 'hintkeys'</tags>
<spec>'hintkeys' 'hk'</spec> <spec>'hintkeys' 'hk'</spec>
<type>string</type> <type>&option.hintkeys.type;</type>
<default>0123456789</default> <default>&option.hintkeys.default;</default>
<description> <description>
<p> <p>
The keys used to label and select hints. With its default value, The keys used to label and select hints. With its default value,
@@ -795,8 +796,8 @@
<item> <item>
<tags>'hm' 'hintmatching'</tags> <tags>'hm' 'hintmatching'</tags>
<spec>'hintmatching' 'hm'</spec> <spec>'hintmatching' 'hm'</spec>
<type>stringlist</type> <type>&option.hintmatching.type;</type>
<default>contains</default> <default>&option.hintmatching.default;</default>
<description> <description>
<p>Change the hint matching algorithm used in Hints mode.</p> <p>Change the hint matching algorithm used in Hints mode.</p>
@@ -848,7 +849,7 @@
<tags>'ht' 'hinttags'</tags> <tags>'ht' 'hinttags'</tags>
<strut/> <strut/>
<spec>'hinttags' 'ht'</spec> <spec>'hinttags' 'ht'</spec>
<type>stringlist</type> <type>&option.hinttags.type;</type>
<default>a,area,button,iframe,input:not([type=hidden]),select,textarea, <default>a,area,button,iframe,input:not([type=hidden]),select,textarea,
[onclick],[onmouseover],[onmousedown],[onmouseup],[oncommand], [onclick],[onmouseover],[onmousedown],[onmouseup],[oncommand],
[tabindex],[role=link],[role=button]</default> [tabindex],[role=link],[role=button]</default>
@@ -867,8 +868,8 @@
<item> <item>
<tags>'hto' 'hinttimeout'</tags> <tags>'hto' 'hinttimeout'</tags>
<spec>'hinttimeout' 'hto'</spec> <spec>'hinttimeout' 'hto'</spec>
<type>number</type> <type>&option.hinttimeout.type;</type>
<default>0</default> <default>&option.hinttimeout.default;</default>
<description> <description>
<p> <p>
Timeout in milliseconds before automatically following a non-unique Timeout in milliseconds before automatically following a non-unique
@@ -883,8 +884,8 @@
<item> <item>
<tags>'hi' 'history'</tags> <tags>'hi' 'history'</tags>
<spec>'history' 'hi'</spec> <spec>'history' 'hi'</spec>
<type>number</type> <type>&option.history.type;</type>
<default>500</default> <default>&option.history.default;</default>
<description> <description>
<p> <p>
Maximum number of Ex commands and find patterns to store in the Maximum number of Ex commands and find patterns to store in the
@@ -897,8 +898,8 @@
<tags>'nohlf' 'nohlfind'</tags> <tags>'nohlf' 'nohlfind'</tags>
<tags>'hlf' 'hlfind'</tags> <tags>'hlf' 'hlfind'</tags>
<spec>'hlfind' 'hlf'</spec> <spec>'hlfind' 'hlf'</spec>
<type>boolean</type> <type>&option.hlfind.type;</type>
<default>off</default> <default>&option.hlfind.default;</default>
<description> <description>
<p>Highlight previous find pattern matches.</p> <p>Highlight previous find pattern matches.</p>
</description> </description>
@@ -908,8 +909,8 @@
<tags>'noif' 'noincfind'</tags> <tags>'noif' 'noincfind'</tags>
<tags>'if' 'incfind'</tags> <tags>'if' 'incfind'</tags>
<spec>'incfind' 'if'</spec> <spec>'incfind' 'if'</spec>
<type>boolean</type> <type>&option.incfind.type;</type>
<default>on</default> <default>&option.incfind.default;</default>
<description> <description>
<p>Show the first match for a find pattern as it is typed.</p> <p>Show the first match for a find pattern as it is typed.</p>
</description> </description>
@@ -919,8 +920,8 @@
<tags>'noim' 'noinsertmode'</tags> <tags>'noim' 'noinsertmode'</tags>
<tags>'im' 'insertmode'</tags> <tags>'im' 'insertmode'</tags>
<spec>'insertmode' 'im'</spec> <spec>'insertmode' 'im'</spec>
<type>boolean</type> <type>&option.insertmode.type;</type>
<default>on</default> <default>&option.insertmode.default;</default>
<description> <description>
<p> <p>
Use Insert mode as the default for text areas. This is useful if you Use Insert mode as the default for text areas. This is useful if you
@@ -939,8 +940,8 @@
<tags>'nojsd' 'nojsdebugger'</tags> <tags>'nojsd' 'nojsdebugger'</tags>
<tags>'jsd' 'jsdebugger'</tags> <tags>'jsd' 'jsdebugger'</tags>
<spec>'jsdebugger' 'jsd'</spec> <spec>'jsdebugger' 'jsd'</spec>
<type>boolean</type> <type>&option.jsdebugger.type;</type>
<default>off</default> <default>&option.jsdebugger.default;</default>
<description> <description>
<p> <p>
Use the JavaScript debugger service for JavaScript completion. Use the JavaScript debugger service for JavaScript completion.
@@ -952,8 +953,8 @@
<tags>'nolpl' 'noloadplugins'</tags> <tags>'nolpl' 'noloadplugins'</tags>
<tags>'lpl' 'loadplugins'</tags> <tags>'lpl' 'loadplugins'</tags>
<spec>'loadplugins' 'lpl'</spec> <spec>'loadplugins' 'lpl'</spec>
<type>regexplist</type> <type>&option.loadplugins.type;</type>
<default>'\.(js|&dactyl.fileExt;)$'</default> <default>&option.loadplugins.default;</default>
<description> <description>
<p> <p>
A regular expression list that defines which plugins are loaded at A regular expression list that defines which plugins are loaded at
@@ -990,8 +991,8 @@
<item> <item>
<tags>'ml' 'mapleader'</tags> <tags>'ml' 'mapleader'</tags>
<spec>'mapleader' 'ml'</spec> <spec>'mapleader' 'ml'</spec>
<type>string</type> <type>&option.mapleader.type;</type>
<default>\</default> <default>&option.mapleader.default;</default>
<description> <description>
<p>Defines the replacement keys for the <k name="Leader"/> pseudo-key.</p> <p>Defines the replacement keys for the <k name="Leader"/> pseudo-key.</p>
</description> </description>
@@ -1000,8 +1001,8 @@
<item> <item>
<tags>'maxitems'</tags> <tags>'maxitems'</tags>
<spec>'maxitems'</spec> <spec>'maxitems'</spec>
<type>number</type> <type>&option.maxitems.type;</type>
<default>20</default> <default>&option.maxitems.default;</default>
<description> <description>
<p>Maximum number of items to display at once in a listing.</p> <p>Maximum number of items to display at once in a listing.</p>
</description> </description>
@@ -1010,8 +1011,8 @@
<item> <item>
<tags>'msgs' 'messages'</tags> <tags>'msgs' 'messages'</tags>
<spec>'messages' 'msgs'</spec> <spec>'messages' 'msgs'</spec>
<type>number</type> <type>&option.messages.type;</type>
<default>100</default> <default>&option.messages.default;</default>
<description> <description>
<p>Maximum number of messages to store in the message history.</p> <p>Maximum number of messages to store in the message history.</p>
</description> </description>
@@ -1020,8 +1021,8 @@
<item> <item>
<tags>'nomore' 'more'</tags> <tags>'nomore' 'more'</tags>
<spec>'more'</spec> <spec>'more'</spec>
<type>boolean</type> <type>&option.more.type;</type>
<default>on</default> <default>&option.more.default;</default>
<description> <description>
<p> <p>
Pause the message list window when more than one screen of Pause the message list window when more than one screen of
@@ -1033,8 +1034,8 @@
<item> <item>
<tags>'newtab'</tags> <tags>'newtab'</tags>
<spec>'newtab'</spec> <spec>'newtab'</spec>
<type>stringlist</type> <type>&option.newtab.type;</type>
<default></default> <default>&option.newtab.default;</default>
<description> <description>
<p> <p>
Defines which Ex commands open pages in new tabs rather than the Defines which Ex commands open pages in new tabs rather than the
@@ -1062,8 +1063,8 @@
<tags>'nextpattern'</tags> <tags>'nextpattern'</tags>
<strut/> <strut/>
<spec>'nextpattern'</spec> <spec>'nextpattern'</spec>
<type>stringlist</type> <type>&option.nextpattern.type;</type>
<default>'\bnext',^>$,'^(>>|»)$','^(>|»)','(>|»)$','\bmore\b'</default> <default>&option.nextpattern.default;</default>
<description> <description>
<p> <p>
Patterns to use when guessing the next page in a document Patterns to use when guessing the next page in a document
@@ -1078,8 +1079,8 @@
<item> <item>
<tags>'noonline' 'online'</tags> <tags>'noonline' 'online'</tags>
<spec>'online'</spec> <spec>'online'</spec>
<type>boolean</type> <type>&option.online.type;</type>
<default>on</default> <default>&option.online.default;</default>
<description> <description>
<p> <p>
Enables or disables offline mode, where network access is Enables or disables offline mode, where network access is
@@ -1091,8 +1092,8 @@
<item> <item>
<tags>'pa' 'pageinfo'</tags> <tags>'pa' 'pageinfo'</tags>
<spec>'pageinfo' 'pa'</spec> <spec>'pageinfo' 'pa'</spec>
<type>charlist</type> <type>&option.pageinfo.type;</type>
<default>gfm</default> <default>&option.pageinfo.default;</default>
<description> <description>
<p>Info shown in the <ex>:pageinfo</ex> output.</p> <p>Info shown in the <ex>:pageinfo</ex> output.</p>
@@ -1114,8 +1115,8 @@
<item> <item>
<tags>'pk' 'passkeys'</tags> <tags>'pk' 'passkeys'</tags>
<spec>'passkeys' 'pk'</spec> <spec>'passkeys' 'pk'</spec>
<type>sitemap</type> <type>&option.passkeys.type;</type>
<default/> <default>&option.passkeys.default;</default>
<description> <description>
<p> <p>
Pass certain keys through directly for the given URLs. Pass certain keys through directly for the given URLs.
@@ -1144,8 +1145,8 @@
<item> <item>
<tags>'pps' 'popups'</tags> <tags>'pps' 'popups'</tags>
<spec>'popups' 'pps'</spec> <spec>'popups' 'pps'</spec>
<type>stringlist</type> <type>&option.popups.type;</type>
<default>tab</default> <default>&option.popups.default;</default>
<description> <description>
<p> <p>
Defines where to show requested pop-up windows. Applies only to Defines where to show requested pop-up windows. Applies only to
@@ -1179,8 +1180,8 @@
<tags>'previouspattern'</tags> <tags>'previouspattern'</tags>
<strut/> <strut/>
<spec>'previouspattern'</spec> <spec>'previouspattern'</spec>
<type>stringlist</type> <type>&option.previouspattern.type;</type>
<default><![CDATA['\bprev|previous\b',^<$,'^(<<|«)$','^(<|«)','(<|«)$']]></default> <default>&option.previouspattern.default;</default>
<description> <description>
<p> <p>
Patterns to use when guessing the previous page in a document Patterns to use when guessing the previous page in a document
@@ -1195,8 +1196,8 @@
<item> <item>
<tags>'noprivate' 'private'</tags> <tags>'noprivate' 'private'</tags>
<spec>'private'</spec> <spec>'private'</spec>
<type>boolean</type> <type>&option.private.type;</type>
<default>off</default> <default>&option.private.default;</default>
<description> <description>
<p> <p>
Set the <str>private browsing</str> option. In private browsing mode Set the <str>private browsing</str> option. In private browsing mode
@@ -1213,7 +1214,7 @@
<tags>$&dactyl.idName;_RUNTIME</tags> <tags>$&dactyl.idName;_RUNTIME</tags>
<tags>'rtp' 'runtimepath'</tags> <tags>'rtp' 'runtimepath'</tags>
<spec>'runtimepath' 'rtp'</spec> <spec>'runtimepath' 'rtp'</spec>
<type>stringlist</type> <type>&option.runtimepath.type;</type>
<default type="plain"><str>$&dactyl.idName;_RUNTIME</str> or <default type="plain"><str>$&dactyl.idName;_RUNTIME</str> or
Unix, Mac: <str>~/.&dactyl.name;</str> Unix, Mac: <str>~/.&dactyl.name;</str>
Windows: <str>~/&dactyl.name;</str></default> Windows: <str>~/&dactyl.name;</str></default>
@@ -1247,8 +1248,8 @@
<tags>'si' 'sanitizeitems'</tags> <tags>'si' 'sanitizeitems'</tags>
<spec>'sanitizeitems' 'si'</spec> <spec>'sanitizeitems' 'si'</spec>
<strut/> <strut/>
<type>stringlist</type> <type>&option.sanitizeitems.type;</type>
<default>all</default> <default>&option.sanitizeitems.default;</default>
<description> <description>
<p> <p>
The default list of private items to sanitize. See The default list of private items to sanitize. See
@@ -1260,8 +1261,8 @@
<item> <item>
<tags>'ss' 'sanitizeshutdown'</tags> <tags>'ss' 'sanitizeshutdown'</tags>
<spec>'sanitizeshutdown' 'ss'</spec> <spec>'sanitizeshutdown' 'ss'</spec>
<type>stringlist</type> <type>&option.sanitizeshutdown.type;</type>
<default/> <default>&option.sanitizeshutdown.default;</default>
<description> <description>
<p>The items to sanitize automatically at shutdown.</p> <p>The items to sanitize automatically at shutdown.</p>
</description> </description>
@@ -1271,8 +1272,8 @@
<tags>'sts' 'sanitizetimespan'</tags> <tags>'sts' 'sanitizetimespan'</tags>
<spec>'sanitizetimespan' 'sts'</spec> <spec>'sanitizetimespan' 'sts'</spec>
<strut/> <strut/>
<type>number</type> <type>&option.sanitizetimespan.type;</type>
<default>all</default> <default>&option.sanitizetimespan.default;</default>
<description> <description>
<p> <p>
The default sanitizer time span. Only items created within this timespan are The default sanitizer time span. Only items created within this timespan are
@@ -1293,8 +1294,8 @@
<item> <item>
<tags>'scr' 'scroll'</tags> <tags>'scr' 'scroll'</tags>
<spec>'scroll' 'scr'</spec> <spec>'scroll' 'scr'</spec>
<type>number</type> <type>&option.scroll.type;</type>
<default>0</default> <default>&option.scroll.default;</default>
<description> <description>
<p> <p>
Number of lines to scroll with <k name="C-u"/> and <k name="C-d"/> Number of lines to scroll with <k name="C-u"/> and <k name="C-d"/>
@@ -1309,7 +1310,7 @@
<item> <item>
<tags>'sh' 'shell'</tags> <tags>'sh' 'shell'</tags>
<spec>'shell' 'sh'</spec> <spec>'shell' 'sh'</spec>
<type>string</type> <type>&option.shell.type;</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>
<description> <description>
<p>Shell to use for executing <ex>:!</ex> and <ex>:run</ex> commands.</p> <p>Shell to use for executing <ex>:!</ex> and <ex>:run</ex> commands.</p>
@@ -1320,7 +1321,7 @@
<tags>'shcf' 'shellcmdflag'</tags> <tags>'shcf' 'shellcmdflag'</tags>
<spec>'shellcmdflag' 'shcf'</spec> <spec>'shellcmdflag' 'shcf'</spec>
<strut/> <strut/>
<type>string</type> <type>&option.shellcmdflag.type;</type>
<default type="plain"><str>-c</str>, Windows: <str>/c</str></default> <default type="plain"><str>-c</str>, Windows: <str>/c</str></default>
<description> <description>
<p>Flag passed to shell when executing <ex>:!</ex> and <ex>:run</ex> commands.</p> <p>Flag passed to shell when executing <ex>:!</ex> and <ex>:run</ex> commands.</p>
@@ -1331,8 +1332,8 @@
<tags>'nosmd' 'noshowmode'</tags> <tags>'nosmd' 'noshowmode'</tags>
<tags>'smd' 'showmode'</tags> <tags>'smd' 'showmode'</tags>
<spec>'showmode' 'smd'</spec> <spec>'showmode' 'smd'</spec>
<type>regexplist</type> <type>&option.showmode.type;</type>
<default>!^normal$</default> <default>&option.showmode.default;</default>
<description> <description>
<p>Show the current mode in the command line if it matches this expression.</p> <p>Show the current mode in the command line if it matches this expression.</p>
</description> </description>
@@ -1342,8 +1343,8 @@
<tags>'ssli' 'showstatuslinks'</tags> <tags>'ssli' 'showstatuslinks'</tags>
<spec>'showstatuslinks' 'ssli'</spec> <spec>'showstatuslinks' 'ssli'</spec>
<strut/> <strut/>
<type>string</type> <type>&option.showstatuslinks.type;</type>
<default>status</default> <default>&option.showstatuslinks.default;</default>
<description> <description>
<p> <p>
When the mouse hovers over a link, or a link is otherwise focused, When the mouse hovers over a link, or a link is otherwise focused,
@@ -1363,8 +1364,8 @@
<item> <item>
<tags>'stal' 'showtabline'</tags> <tags>'stal' 'showtabline'</tags>
<spec>'showtabline' 'stal'</spec> <spec>'showtabline' 'stal'</spec>
<type>string</type> <type>&option.showtabline.type;</type>
<default>always</default> <default>&option.showtabline.default;</default>
<description> <description>
<p>Define when the tab bar is visible.</p> <p>Define when the tab bar is visible.</p>
@@ -1380,8 +1381,8 @@
<tags>'nosf' 'nostrictfocus'</tags> <tags>'nosf' 'nostrictfocus'</tags>
<tags>'sf' 'strictfocus'</tags> <tags>'sf' 'strictfocus'</tags>
<spec>'strictfocus' 'sf'</spec> <spec>'strictfocus' 'sf'</spec>
<type>boolean</type> <type>&option.strictfocus.type;</type>
<default>on</default> <default>&option.strictfocus.default;</default>
<description> <description>
<p> <p>
Prevent scripts from focusing input elements without user intervention. Prevent scripts from focusing input elements without user intervention.
@@ -1392,8 +1393,8 @@
<item> <item>
<tags>'suggestengines'</tags> <tags>'suggestengines'</tags>
<spec>'suggestengines'</spec> <spec>'suggestengines'</spec>
<type>stringlist</type> <type>&option.suggestengines.type;</type>
<default>google</default> <default>&option.suggestengines.default;</default>
<description> <description>
<p> <p>
Set the search engines which can be used for completion Set the search engines which can be used for completion
@@ -1406,8 +1407,8 @@
<tags>'notmo' 'notimeout'</tags> <tags>'notmo' 'notimeout'</tags>
<tags>'tmo' 'timeout'</tags> <tags>'tmo' 'timeout'</tags>
<spec>'timeout' 'tmo'</spec> <spec>'timeout' 'tmo'</spec>
<type>boolean</type> <type>&option.timeout.type;</type>
<default>true</default> <default>&option.timeout.default;</default>
<description> <description>
<p> <p>
When this option is set and a key sequence interpretable both as a When this option is set and a key sequence interpretable both as a
@@ -1420,8 +1421,8 @@
<item> <item>
<tags>'tmol' 'timeoutlen'</tags> <tags>'tmol' 'timeoutlen'</tags>
<spec>'timeoutlen' 'tmol'</spec> <spec>'timeoutlen' 'tmol'</spec>
<type>number</type> <type>&option.timeoutlen.type;</type>
<default>1000</default> <default>&option.timeoutlen.default;</default>
<description> <description>
<p> <p>
Maximum number of milliseconds to wait for a longer key command Maximum number of milliseconds to wait for a longer key command
@@ -1434,8 +1435,8 @@
<item> <item>
<tags>'titlestring'</tags> <tags>'titlestring'</tags>
<spec>'titlestring'</spec> <spec>'titlestring'</spec>
<type>string</type> <type>&option.titlestring.type;</type>
<default>&dactyl.appName;</default> <default>&option.titlestring.default;</default>
<description> <description>
<p> <p>
Set the application name shown after the current page title in Set the application name shown after the current page title in
@@ -1448,8 +1449,8 @@
<item> <item>
<tags>'us' 'urlsep' 'urlseparator'</tags> <tags>'us' 'urlsep' 'urlseparator'</tags>
<spec>'urlseparator' 'urlsep' 'us'</spec> <spec>'urlseparator' 'urlsep' 'us'</spec>
<type>string</type> <type>&option.urlseparator.type;</type>
<default>\|</default> <default>&option.urlseparator.default;</default>
<description> <description>
<p> <p>
The regular expression used to split URL lists in commands The regular expression used to split URL lists in commands
@@ -1465,8 +1466,8 @@
<tags>'noum' 'nousermode'</tags> <tags>'noum' 'nousermode'</tags>
<tags>'um' 'usermode'</tags> <tags>'um' 'usermode'</tags>
<spec>'usermode' 'um'</spec> <spec>'usermode' 'um'</spec>
<type>boolean</type> <type>&option.usermode.type;</type>
<default>off</default> <default>&option.usermode.default;</default>
<description> <description>
<p>Show current website with minimal styling.</p> <p>Show current website with minimal styling.</p>
</description> </description>
@@ -1475,8 +1476,8 @@
<item> <item>
<tags>'vbs' 'verbose'</tags> <tags>'vbs' 'verbose'</tags>
<spec>'verbose' 'vbs'</spec> <spec>'verbose' 'vbs'</spec>
<type>number</type> <type>&option.verbose.type;</type>
<default>1</default> <default>&option.verbose.default;</default>
<description> <description>
<p> <p>
Define which info messages are displayed. As the value increases, Define which info messages are displayed. As the value increases,
@@ -1493,8 +1494,8 @@
<tags>'novb' 'novisualbell'</tags> <tags>'novb' 'novisualbell'</tags>
<tags>'vb' 'visualbell'</tags> <tags>'vb' 'visualbell'</tags>
<spec>'visualbell' 'vb'</spec> <spec>'visualbell' 'vb'</spec>
<type>boolean</type> <type>&option.visualbell.type;</type>
<default>off</default> <default>&option.visualbell.default;</default>
<description> <description>
<p> <p>
Use visual bell instead of beeping on errors. The visual bell Use visual bell instead of beeping on errors. The visual bell
@@ -1508,8 +1509,8 @@
<tags>'wia' 'wildanchor'</tags> <tags>'wia' 'wildanchor'</tags>
<strut/> <strut/>
<spec>'wildanchor' 'wia'</spec> <spec>'wildanchor' 'wia'</spec>
<type>regexplist</type> <type>&option.wildanchor.type;</type>
<default>!'/ex/(back|buffer|ext|forward|help|undo)'</default> <default>&option.wildanchor.default;</default>
<description> <description>
<p> <p>
Regular expression list defining which completion groups show only Regular expression list defining which completion groups show only
@@ -1526,8 +1527,8 @@
<item> <item>
<tags>'wic' 'wildcase'</tags> <tags>'wic' 'wildcase'</tags>
<spec>'wildcase' 'wic'</spec> <spec>'wildcase' 'wic'</spec>
<type>regexpmap</type> <type>&option.wildcase.type;</type>
<default>.?:smart</default> <default>&option.wildcase.default;</default>
<description> <description>
<p> <p>
Defines how completions are matched with regard to character case. Defines how completions are matched with regard to character case.
@@ -1547,8 +1548,8 @@
<item> <item>
<tags>'wig' 'wildignore'</tags> <tags>'wig' 'wildignore'</tags>
<spec>'wildignore' 'wig'</spec> <spec>'wildignore' 'wig'</spec>
<type>regexplist</type> <type>&option.wildignore.type;</type>
<default></default> <default>&option.wildignore.default;</default>
<description> <description>
<p> <p>
List of file patterns to ignore when completing files. For example, List of file patterns to ignore when completing files. For example,
@@ -1564,8 +1565,8 @@
<item> <item>
<tags>'wim' 'wildmode'</tags> <tags>'wim' 'wildmode'</tags>
<spec>'wildmode' 'wim'</spec> <spec>'wildmode' 'wim'</spec>
<type>stringlist</type> <type>&option.wildmode.type;</type>
<default>list:full</default> <default>&option.wildmode.default;</default>
<description> <description>
<p> <p>
Defines how command-line completion works. It is a comma-separated Defines how command-line completion works. It is a comma-separated
@@ -1602,8 +1603,8 @@
<item> <item>
<tags>'wis' 'wildsort'</tags> <tags>'wis' 'wildsort'</tags>
<spec>'wildsort' 'wis'</spec> <spec>'wildsort' 'wis'</spec>
<type>regexplist</type> <type>&option.wildsort.type;</type>
<default>.*</default> <default>&option.wildsort.default;</default>
<description> <description>
<p> <p>
A list of regular expressions defining which completion contexts A list of regular expressions defining which completion contexts
@@ -1620,8 +1621,8 @@
<tags>'wsp' 'wordseparators'</tags> <tags>'wsp' 'wordseparators'</tags>
<spec>'wordseparators' 'wsp'</spec> <spec>'wordseparators' 'wsp'</spec>
<strut/> <strut/>
<type>string</type> <type>&option.wordseparators.type;</type>
<default><![CDATA[[.,!?:;\\/"^$%&?()[\]{}<>#*+|=~ _-]]]></default> <default>&option.wordseparators.default;</default>
<description> <description>
<p> <p>
A regular expression which defines how words are split for A regular expression which defines how words are split for

View File

@@ -27,12 +27,7 @@ var ConfigBase = Class("ConfigBase", {
set.add(this.features, "Gecko2"); set.add(this.features, "Gecko2");
this.timeout(function () { this.timeout(function () {
services["dactyl:"].pages.dtd = function () [null, services["dactyl:"].pages.dtd = function () [null, util.makeDTD(config.dtd)];
iter(config.dtdExtra,
(["dactyl." + k, v] for ([k, v] in iter(config.dtd))),
(["dactyl." + s, config[s]] for each (s in config.dtdStrings)))
.map(function ([k, v]) ["<!ENTITY ", k, " '", String.replace(v || "null", /'/g, "&apos;"), "'>"].join(""))
.join("\n")]
}); });
}, },
@@ -168,9 +163,15 @@ var ConfigBase = Class("ConfigBase", {
return version; return version;
}), }),
get fileExt() this.name.slice(0, -5), get fileExt() this.name.slice(0, -6),
dtd: memoize({ dtd: Class.memoize(function ()
iter(this.dtdExtra,
(["dactyl." + k, v] for ([k, v] in iter(config.dtdDactyl))),
(["dactyl." + s, config[s]] for each (s in config.dtdStrings)))
.toObject()),
dtdDactyl: memoize({
get name() config.name, 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,

View File

@@ -67,7 +67,7 @@ var Messages = Module("messages", {
catch (e) {} catch (e) {}
// Report error so tests fail, but don't throw // Report error so tests fail, but don't throw
if (arguments.length < 2) if (arguments.length < 2) // Do *not* localize these strings
util.reportError(Error("Invalid locale string: " + value)); util.reportError(Error("Invalid locale string: " + value));
return arguments.length > 1 ? default_ : value; return arguments.length > 1 ? default_ : value;
}, },
@@ -80,7 +80,7 @@ var Messages = Module("messages", {
catch (e) {} catch (e) {}
// Report error so tests fail, but don't throw // Report error so tests fail, but don't throw
if (arguments.length < 3) if (arguments.length < 3) // Do *not* localize these strings
util.reportError(Error("Invalid locale string: " + value)); util.reportError(Error("Invalid locale string: " + value));
return arguments.length > 2 ? default_ : value; return arguments.length > 2 ? default_ : value;
} }

View File

@@ -748,6 +748,18 @@ var Options = Module("options", {
if (event == "change" && opt) if (event == "change" && opt)
opt.set(opt.globalValue, Option.SCOPE_GLOBAL, true); opt.set(opt.globalValue, Option.SCOPE_GLOBAL, true);
}, window); }, window);
services["dactyl:"].pages["options.dtd"] = function () [null,
util.makeDTD(
iter(([["option", o.name, "default"].join("."),
o.type === "string" ? o.value.replace(/'/g, "''") :
o.value === true ? "on" :
o.value === false ? "off" : o.stringDefaultValue]
for (o in self)),
([["option", o.name, "type"].join("."), o.type] for (o in self)),
config.dtd))];
}, },
dactyl: dactyl, dactyl: dactyl,

View File

@@ -171,7 +171,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
let saved = this.get(this.SAVED + name); let saved = this.get(this.SAVED + name);
if (saved == null && curval != defval || saved != null && curval != saved) { if (saved == null && curval != defval || saved != null && curval != saved) {
let msg = "Warning: setting preference " + name + ", but it's changed from its default value."; let msg = _("pref.safeSet.warnChanged", name);
if (message) if (message)
msg = template.linkifyHelp(msg + " " + message); msg = template.linkifyHelp(msg + " " + message);
util.dactyl.warn(msg); util.dactyl.warn(msg);

View File

@@ -974,6 +974,12 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
.map(function (node) "//" + node).join(" | "); .map(function (node) "//" + node).join(" | ");
}, },
makeDTD: function makeDTD(obj) unescape(encodeURI(iter(obj)
.map(function ([k, v]) ["<!ENTITY ", k, ' "', String.replace(v == null ? "null" : v, /[&"<%]/g,
function (m) ({ '"': "&quot;", "&": "&amp;", "<": "&lt;", "%": "&#x25;" })[m]),
'">'].join(""))
.join("\n"))),
map: deprecated("iter.map", function map(obj, fn, self) iter(obj).map(fn, self).toArray()), map: deprecated("iter.map", function map(obj, fn, self) iter(obj).map(fn, self).toArray()),
writeToClipboard: deprecated("dactyl.clipboardWrite", function writeToClipboard(str, verbose) util.dactyl.clipboardWrite(str, verbose)), writeToClipboard: deprecated("dactyl.clipboardWrite", function writeToClipboard(str, verbose) util.dactyl.clipboardWrite(str, verbose)),
readFromClipboard: deprecated("dactyl.clipboardRead", function readFromClipboard() util.dactyl.clipboardRead(false)), readFromClipboard: deprecated("dactyl.clipboardRead", function readFromClipboard() util.dactyl.clipboardRead(false)),