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

Add -append options to :hi and :sty. Fix some bugs (no, I don't know which bugs)

This commit is contained in:
Kris Maglione
2008-11-01 02:04:42 +00:00
parent c5ec767aa5
commit b904f580bb
7 changed files with 71 additions and 173 deletions

View File

@@ -41,7 +41,11 @@ function Command(specs, description, action, extraInfo) //{{{
// 'abc', 'abcdef'
function parseSpecs(specs)
{
let shortNames = longNames = names = [];
// Whoever wrote the following should be ashamed. :(
// let shortNames = longNames = names = [];
let names = [];
let longNames = [];
let shortNames = [];
for (let [,spec] in Iterator(specs))
{
@@ -247,14 +251,11 @@ function Commands() //{{{
if (!command)
return false;
for (let i = 0; i < exCommands.length; i++)
if (exCommands.some(function (c) c.name == command.name))
{
if (exCommands[i].name == command.name)
{
// never replace for now
liberator.log("Warning: :" + names[0] + " already exists, NOT replacing existing command.", 1);
return false;
}
// never replace for now
liberator.log("Warning: :" + names[0] + " already exists, NOT replacing existing command.", 1);
return false;
}
exCommands.push(command);