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

Crude source line linkification in :*usage.

This commit is contained in:
Kris Maglione
2010-12-03 18:11:05 -05:00
parent 4f696a4a2e
commit 252e7450f1
6 changed files with 42 additions and 10 deletions

View File

@@ -451,10 +451,14 @@ const Commands = Module("commands", {
repeat: null,
_addCommand: function (args, replace) {
if (!args[3])
args[3] = {};
args[3].definedAt = Components.stack.caller.caller;
let names = array.flatten(Command.parseSpecs(args[0]));
dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this),
"E182: Can't replace non-user command: " + args[0][0]);
if (!replace || !(args[3] && args[3].user))
if (!replace || !args[3].user)
dactyl.assert(!names.some(function (name) name in this._exMap, this),
"Not replacing command " + args[0]);
for (let name in values(names)) {