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

Add a Map#isUserMap property.

This is symmetrical with Command#isUserCommand although both should
probably be renamed #user given the other property names.
This commit is contained in:
Doug Kearns
2009-07-01 18:52:32 +10:00
parent 3bb2f92e83
commit 8ef5ab8178
2 changed files with 20 additions and 9 deletions

View File

@@ -370,11 +370,11 @@ function Commands() //{{{
return [len - str.length, arg, quote];
}
function addCommand(command, isUserCommand, replace)
function addCommand(command, replace)
{
if (exCommands.some(function (c) c.hasName(command.name)))
{
if (isUserCommand && replace)
if (command.isUserCommand && replace)
commands.removeUserCommand(command.name);
else
{
@@ -472,7 +472,7 @@ function Commands() //{{{
*/
add: function (names, description, action, extra)
{
return addCommand(new Command(names, description, action, extra), false, false);
return addCommand(new Command(names, description, action, extra), false);
},
/**
@@ -493,7 +493,7 @@ function Commands() //{{{
extra.isUserCommand = true;
description = description || "User defined command";
return addCommand(new Command(names, description, action, extra), true, replace);
return addCommand(new Command(names, description, action, extra), replace);
},
/**