1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 05:58:03 +01:00

NEWS updates and whitespace fixes.

This commit is contained in:
Kris Maglione
2010-09-19 02:13:19 -04:00
parent a53edafac1
commit 72be646c5b
19 changed files with 57 additions and 50 deletions

View File

@@ -6,7 +6,7 @@ BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S")
BASE = $(TOP)/../common BASE = $(TOP)/../common
GOOGLE_PROJ = dactyl GOOGLE_PROJ = dactyl
GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files
VERSION = $(shell sed -n 's/.*<em:version>\(.*\)<.*/\1/p' $(TOP)/install.rdf) VERSION = $(shell sed -n 's/.*em:version\(>\|="\)\(.*\)["<].*/\2/p' $(TOP)/install.rdf)
LOCALEDIR = locale LOCALEDIR = locale
DOC_FILES = $(wildcard $(LOCALEDIR)/*/*.xml) DOC_FILES = $(wildcard $(LOCALEDIR)/*/*.xml)

View File

@@ -363,7 +363,7 @@ const Bookmarks = Module("bookmarks", {
completion.bookmark(context, args["-tags"]); completion.bookmark(context, args["-tags"]);
}, },
options: [tags, options: [tags,
{ {
names: ["-max", "-m"], names: ["-max", "-m"],
description: "The maximum number of items to list or open", description: "The maximum number of items to list or open",
type: CommandOption.INT type: CommandOption.INT

View File

@@ -451,7 +451,7 @@ const CommandLine = Module("commandline", {
/** /**
* Displays the multi-line output of a command, preceded by the last * Displays the multi-line output of a command, preceded by the last
* executed ex command string. * executed ex command string.
* *
* @param {XML} xml The output as an E4X XML object. * @param {XML} xml The output as an E4X XML object.
*/ */
commandOutput: function (xml) { commandOutput: function (xml) {
@@ -1532,14 +1532,14 @@ const CommandLine = Module("commandline", {
action: function (timespan, host) { action: function (timespan, host) {
if (!host) if (!host)
storage["history-search"].mutate("filter", function (item) !timespan.contains(item.timestamp)); storage["history-search"].mutate("filter", function (item) !timespan.contains(item.timestamp));
storage["history-command"].mutate("filter", function (item) storage["history-command"].mutate("filter", function (item)
!(timespan.contains(item.timestamp) && (!host || commands.hasDomain(item.value, host)))); !(timespan.contains(item.timestamp) && (!host || commands.hasDomain(item.value, host))));
} }
}); });
// Delete history-like items from the commandline and messages on history purge // Delete history-like items from the commandline and messages on history purge
sanitizer.addItem("history", { sanitizer.addItem("history", {
action: function (timespan, host) { action: function (timespan, host) {
storage["history-command"].mutate("filter", function (item) storage["history-command"].mutate("filter", function (item)
!(timespan.contains(item.timestamp) && (host ? commands.hasDomain(item.value, host) : item.privateData))); !(timespan.contains(item.timestamp) && (host ? commands.hasDomain(item.value, host) : item.privateData)));
commandline._messageHistory.filter(function (item) !timespan.contains(item.timestamp * 1000) || commandline._messageHistory.filter(function (item) !timespan.contains(item.timestamp * 1000) ||
!item.domains && !item.privateData || !item.domains && !item.privateData ||
@@ -1601,7 +1601,7 @@ const ItemList = Class("ItemList", {
if (this._container.collapsed) if (this._container.collapsed)
this._div.style.minWidth = document.getElementById("dactyl-commandline").scrollWidth + "px"; this._div.style.minWidth = document.getElementById("dactyl-commandline").scrollWidth + "px";
this._minHeight = Math.max(this._minHeight, this._minHeight = Math.max(this._minHeight,
this._win.scrollY + this._divNodes.completions.getBoundingClientRect().bottom); this._win.scrollY + this._divNodes.completions.getBoundingClientRect().bottom);
if (this._container.collapsed) if (this._container.collapsed)

View File

@@ -272,7 +272,7 @@ const Command = Class("Command", {
serialize: null, serialize: null,
/** /**
* @property {number} If this command takes another ex command as an * @property {number} If this command takes another ex command as an
* argument, the index of that argument. Used in determining whether to * argument, the index of that argument. Used in determining whether to
* purge the command from history when clearing private data. * purge the command from history when clearing private data.
*/ */
subCommand: null, subCommand: null,
@@ -474,7 +474,7 @@ const Commands = Module("commands", {
}, },
/** /**
* Returns true if a command invocation contains a URL referring to the * Returns true if a command invocation contains a URL referring to the
* domain 'host'. * domain 'host'.
* *
* @param {string} command * @param {string} command
@@ -494,7 +494,7 @@ const Commands = Module("commands", {
}, },
/** /**
* Returns true if a command invocation contains private data which should * Returns true if a command invocation contains private data which should
* be cleared when purging private data. * be cleared when purging private data.
* *
* @param {string} command * @param {string} command
@@ -1070,13 +1070,13 @@ const Commands = Module("commands", {
options: [ options: [
{ names: ["-bang"], description: "Command may be proceeded by a !" }, { names: ["-bang"], description: "Command may be proceeded by a !" },
{ names: ["-count"], description: "Command may be preceeded by a count" }, { names: ["-count"], description: "Command may be preceeded by a count" },
{ {
names: ["-description"], names: ["-description"],
description: "A user-visible description of the command", description: "A user-visible description of the command",
type: CommandOption.STRING type: CommandOption.STRING
}, { }, {
// TODO: "E180: invalid complete value: " + arg // TODO: "E180: invalid complete value: " + arg
names: ["-complete"], names: ["-complete"],
description: "The argument completion function", description: "The argument completion function",
completer: function (context) [[k, ""] for ([k, v] in Iterator(completeOptionMap))], completer: function (context) [[k, ""] for ([k, v] in Iterator(completeOptionMap))],
type: CommandOption.STRING, type: CommandOption.STRING,

View File

@@ -544,7 +544,7 @@ const Dactyl = Module("dactyl", {
body += <h2 xmlns={NS.uri} tag={context.INFO.@name + '-plugin'}>{context.INFO.@summary}</h2> + body += <h2 xmlns={NS.uri} tag={context.INFO.@name + '-plugin'}>{context.INFO.@summary}</h2> +
context.INFO; context.INFO;
let help = let help =
'<?xml version="1.0"?>\n' + '<?xml version="1.0"?>\n' +
'<?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>\n' + '<?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>\n' +
'<!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">\n' + '<!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">\n' +
@@ -1419,7 +1419,7 @@ const Dactyl = Module("dactyl", {
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
if (typeof AddonManager == "undefined") if (typeof AddonManager == "undefined")
modules.AddonManager = { modules.AddonManager = {
getAddonByID: function (id, callback) { getAddonByID: function (id, callback) {
callback = callback || util.identity; callback = callback || util.identity;
@@ -1518,7 +1518,7 @@ const Dactyl = Module("dactyl", {
}; };
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
function callResult(method) { function callResult(method) {
let args = Array.slice(arguments, 1); let args = Array.slice(arguments, 1);
return function (result) { result[method].apply(result, args) }; return function (result) { result[method].apply(result, args) };

View File

@@ -78,7 +78,7 @@ const IO = Module("io", {
* @final * @final
*/ */
File: Class("File", File, { File: Class("File", File, {
init: function init(path, checkCWD) init: function init(path, checkCWD)
init.supercall(this, path, (arguments.length < 2 || checkCWD) && io.getCurrentDirectory()) init.supercall(this, path, (arguments.length < 2 || checkCWD) && io.getCurrentDirectory())
}), }),
@@ -671,7 +671,7 @@ lookup:
// NOTE: Vim doesn't replace ! preceded by 2 or more backslashes and documents it - desirable? // NOTE: Vim doesn't replace ! preceded by 2 or more backslashes and documents it - desirable?
// pass through a raw bang when escaped or substitute the last command // pass through a raw bang when escaped or substitute the last command
// This is an asinine and irritating feature when we have searchable // This is an asinine and irritating feature when we have searchable
// command-line history. --Kris // command-line history. --Kris
if (options["banghist"]) if (options["banghist"])

View File

@@ -20,7 +20,8 @@
straightforward, but allows for any number of complex actions to be straightforward, but allows for any number of complex actions to be
executed, with full access to all of the internals of &dactyl.appname; and executed, with full access to all of the internals of &dactyl.appname; and
&dactyl.host;. Both expression evaluation methods support sophisticated &dactyl.host;. Both expression evaluation methods support sophisticated
expression completion, including option lists and descriptions thereof. expression completion, including option lists and descriptions thereof,
along with paren matching and syntax error highlighting.
</p> </p>
<item> <item>

View File

@@ -22,7 +22,7 @@
<p> <p>
&dactyl.appname; has a number of internal variables and switches which can be set to &dactyl.appname; has a number of internal variables and switches which can be set to
achieve special effects. These options come in 5 forms: achieve special effects. These options come in 8 forms:
</p> </p>
<dl> <dl>

View File

@@ -17,7 +17,7 @@ let hasOwnProperty = objproto.hasOwnProperty;
if (!Object.create) if (!Object.create)
Object.create = function (proto, props) { Object.create = function (proto, props) {
let obj = { __proto__: proto }; let obj = { __proto__: proto };
for (let k in properties(props || {})) for (let k in properties(props || {}))
Object.defineProperty(obj, k, props[k]); Object.defineProperty(obj, k, props[k]);
return obj; return obj;
}; };
@@ -82,7 +82,8 @@ if (!Object.keys)
let use = {}; let use = {};
let loaded = {}; let loaded = {};
let currentModule; let currentModule;
function defmodule(name, module, params) { function defmodule(name, params) {
let module = Cu.getGlobalForObject ? Cu.getGlobalForObject(params) : params.__parent__;
module.NAME = name; module.NAME = name;
module.EXPORTED_SYMBOLS = params.exports || []; module.EXPORTED_SYMBOLS = params.exports || [];
defmodule.loadLog.push("defmodule " + name); defmodule.loadLog.push("defmodule " + name);
@@ -129,12 +130,12 @@ function require(obj, name, from) {
Cu.import("resource://dactyl/" + name + ".jsm", obj); Cu.import("resource://dactyl/" + name + ".jsm", obj);
} }
catch (e) { catch (e) {
dump("loading " + String.quote("resource://dactyl/" + name + ".jsm") + "\n"); dump("loading " + String.quote("resource://dactyl/" + name + ".jsm") + "\n");
dump(" " + e.fileName + ":" + e.lineNumber + ": " + e +"\n"); dump(" " + e.fileName + ":" + e.lineNumber + ": " + e +"\n");
} }
} }
defmodule("base", this, { defmodule("base", {
// sed -n 's/^(const|function) ([a-zA-Z0-9_]+).*/ "\2",/p' base.jsm | sort | fmt // sed -n 's/^(const|function) ([a-zA-Z0-9_]+).*/ "\2",/p' base.jsm | sort | fmt
exports: [ exports: [
"Cc", "Ci", "Class", "Cr", "Cu", "Module", "Object", "Runnable", "Cc", "Ci", "Class", "Cr", "Cu", "Module", "Object", "Runnable",
@@ -347,7 +348,7 @@ function iter(obj) {
for (let i = 0; i < obj.length; i++) for (let i = 0; i < obj.length; i++)
yield [obj.name, obj]; yield [obj.name, obj];
})(); })();
if (obj instanceof Ci.mozIStorageStatement) if (obj instanceof Ci.mozIStorageStatement)
return (function (obj) { return (function (obj) {
while (obj.executeStep()) while (obj.executeStep())
yield obj.row; yield obj.row;

View File

@@ -5,7 +5,7 @@
"use strict"; "use strict";
Components.utils.import("resource://dactyl/base.jsm"); Components.utils.import("resource://dactyl/base.jsm");
defmodule("bookmarkcache", this, { defmodule("bookmarkcache", {
exports: ["Bookmark", "BookmarkCache", "Keyword", "bookmarkcache"], exports: ["Bookmark", "BookmarkCache", "Keyword", "bookmarkcache"],
require: ["services", "storage", "util"] require: ["services", "storage", "util"]
}); });

View File

@@ -5,7 +5,7 @@
"use strict"; "use strict";
Components.utils.import("resource://dactyl/base.jsm"); Components.utils.import("resource://dactyl/base.jsm");
defmodule("highlight", this, { defmodule("highlight", {
exports: ["Highlight", "Highlights", "highlight"], exports: ["Highlight", "Highlights", "highlight"],
require: ["services", "styles"], require: ["services", "styles"],
use: ["template", "util"] use: ["template", "util"]

View File

@@ -15,7 +15,7 @@
// - finish 1.9.0 support if we're going to support sanitizing in Xulmus // - finish 1.9.0 support if we're going to support sanitizing in Xulmus
Components.utils.import("resource://dactyl/base.jsm"); Components.utils.import("resource://dactyl/base.jsm");
defmodule("sanitizer", this, { defmodule("sanitizer", {
exports: ["Range", "Sanitizer", "sanitizer"], exports: ["Range", "Sanitizer", "sanitizer"],
require: ["services", "storage", "util"] require: ["services", "storage", "util"]
}); });
@@ -79,7 +79,7 @@ const Sanitizer = Module("sanitizer", tmp.Sanitizer, {
// Zoom level, ... // Zoom level, ...
services.get("contentprefs").removeGroupedPrefs(); services.get("contentprefs").removeGroupedPrefs();
} }
// "Never remember passwords" ... // "Never remember passwords" ...
for each (let domain in services.get("loginmanager").getAllDisabledHosts()) for each (let domain in services.get("loginmanager").getAllDisabledHosts())
if (!host || util.isSubdomain(domain, host)) if (!host || util.isSubdomain(domain, host))

View File

@@ -5,7 +5,7 @@
"use strict"; "use strict";
Components.utils.import("resource://dactyl/base.jsm"); Components.utils.import("resource://dactyl/base.jsm");
defmodule("services", this, { defmodule("services", {
exports: ["Services", "services"] exports: ["Services", "services"]
}); });

View File

@@ -6,7 +6,7 @@
const myObject = Object; const myObject = Object;
Components.utils.import("resource://dactyl/base.jsm"); Components.utils.import("resource://dactyl/base.jsm");
defmodule("storage", this, { defmodule("storage", {
exports: ["File", "storage"], exports: ["File", "storage"],
require: ["services", "util"] require: ["services", "util"]
}); });

View File

@@ -5,7 +5,7 @@
"use strict"; "use strict";
Components.utils.import("resource://dactyl/base.jsm"); Components.utils.import("resource://dactyl/base.jsm");
defmodule("styles", this, { defmodule("styles", {
exports: ["Style", "Styles", "styles"], exports: ["Style", "Styles", "styles"],
require: ["services", "util"], require: ["services", "util"],
use: ["template"] use: ["template"]
@@ -368,7 +368,7 @@ const Styles = Module("Styles", {
if (!cmd.filter || cmd.filter(sheet))]; if (!cmd.filter || cmd.filter(sheet))];
}, },
}, { }, {
names: ["-name", "-n"], names: ["-name", "-n"],
type: modules.CommandOption.STRING, type: modules.CommandOption.STRING,
completer: function () [[name, sheet.css] completer: function () [[name, sheet.css]
for ([name, sheet] in Iterator(styles.userNames)) for ([name, sheet] in Iterator(styles.userNames))

View File

@@ -5,7 +5,7 @@
"use strict"; "use strict";
Components.utils.import("resource://dactyl/base.jsm"); Components.utils.import("resource://dactyl/base.jsm");
defmodule("template", this, { defmodule("template", {
exports: ["Template", "template"], exports: ["Template", "template"],
require: ["util"] require: ["util"]
}); });

View File

@@ -7,7 +7,7 @@
"use strict"; "use strict";
Components.utils.import("resource://dactyl/base.jsm"); Components.utils.import("resource://dactyl/base.jsm");
defmodule("util", this, { defmodule("util", {
exports: ["Math", "NS", "Util", "XHTML", "XUL", "util"], exports: ["Math", "NS", "Util", "XHTML", "XUL", "util"],
require: ["services"], require: ["services"],
use: ["highlight", "template"] use: ["highlight", "template"]

8
pentadactyl/NEWS Executable file → Normal file
View File

@@ -20,18 +20,24 @@
- Supports reverse incremental search. - Supports reverse incremental search.
* IMPORTANT: Plugins are now loaded from the 'plugins/' * IMPORTANT: Plugins are now loaded from the 'plugins/'
directory in 'runtimepath' rather than 'plugin/' directory in 'runtimepath' rather than 'plugin/'
* IMPORTANT: Single quotes no longer treat \s specially
* Replaced 'focuscontent' with 'strictfocus' * Replaced 'focuscontent' with 'strictfocus'
I.e., 'fo\o''bar' ≡ fo\o'bar
* Added 'altwildmode' and <A-Tab> commandline key binding * Added 'altwildmode' and <A-Tab> commandline key binding
* Added 'banghist' option * Added 'banghist' option
* Added transliterated option to 'hintmatching'
* gf now toggles between source and content view. * gf now toggles between source and content view.
The | key binding has been removed. The | key binding has been removed.
* :extadd now supports URLs. * :extadd now supports remote URLs as well as local files on
Firefox 4.
* :open now only opens files beginning with /, ./, ../, or ~/ * :open now only opens files beginning with /, ./, ../, or ~/
* 'complete' now defaults to slf but file completion only * 'complete' now defaults to slf but file completion only
triggers when the URL begins as above. triggers when the URL begins as above.
* Page zoom information is now shown in the status bar, and * Page zoom information is now shown in the status bar, and
change in zoom status no longer appears in :messages. change in zoom status no longer appears in :messages.
* Added ZO, ZI, ZM, and ZR as aliases for zO, zI, zM, and zR * Added ZO, ZI, ZM, and ZR as aliases for zO, zI, zM, and zR
* Completion list now behaves better when the multi-line output
window is displayed
* Major help system improvements: * Major help system improvements:
- Plugins may now provide full-fledged ':help' documentation - Plugins may now provide full-fledged ':help' documentation
- Add basic plugin authorship documentation - Add basic plugin authorship documentation

View File

@@ -1,21 +1,20 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#"> xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest"> <Description about="urn:mozilla:install-manifest"
<em:id>pentadactyl@dactyl.googlecode.com</em:id> em:id="pentadactyl@dactyl.googlecode.com"
<em:name>Pentadactyl</em:name> em:name="Pentadactyl"
<em:version>1.0b1pre</em:version> em:version="1.0b1pre"
<em:description>Firefox for Vim and Links addicts</em:description> em:description="Firefox for Vim and Links addicts"
<em:creator>Kris Maglione</em:creator> em:creator="Kris Maglione"
<em:homepageURL>http://dactyl.sf.net/Pentadactyl</em:homepageURL> em:homepageURL="http://dactyl.sf.net/Pentadactyl"
<em:iconURL>chrome://pentadactyl/skin/icon.png</em:iconURL> em:iconURL="chrome://pentadactyl/skin/icon.png"
<em:optionsURL>chrome://dactyl/content/preferences.xul</em:optionsURL> em:optionsURL="chrome://dactyl/content/preferences.xul">
<em:targetApplication> <em:targetApplication>
<Description> <Description
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
<em:minVersion>3.5</em:minVersion> em:minVersion="3.5"
<em:maxVersion>4.0b7pre</em:maxVersion> em:maxVersion="4.0b7pre"/>
</Description>
</em:targetApplication> </em:targetApplication>
</Description> </Description>
</RDF> </RDF>