From aec2c278c2da8ed0dc9893ea354329fa54382e26 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 10 Dec 2008 17:02:54 +1100 Subject: [PATCH] use argCount: "1" with :*unabbrev commands --- common/content/commands.js | 3 +++ common/content/editor.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/content/commands.js b/common/content/commands.js index ee9a653b..fe3b9fdc 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -408,6 +408,9 @@ function Commands() //{{{ // @param allowUnknownOptions: -foo won't result in an error, if -foo isn't // specified in "options" // TODO: should it handle comments? + // : it might be nice to be able to specify that certain quoting + // should be disabled E.g. backslash without having to resort to + // using literal etc parseArgs: function (str, options, argCount, allowUnknownOptions, literal, complete, extra) { function getNextArg(str) commands.parseArg(str); diff --git a/common/content/editor.js b/common/content/editor.js index 597129e9..8d0073b5 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -179,7 +179,11 @@ function Editor() //{{{ commands.add([ch ? ch + "una[bbrev]" : "una[bbreviate]"], "Remove an abbreviation" + modeDescription, - function (args) { editor.removeAbbreviation(mode, args.string); }); + function (args) { editor.removeAbbreviation(mode, args.literalArg); }, + { + argCount: "1", + literal: 0 + }); commands.add([ch + "abc[lear]"], "Remove all abbreviations" + modeDescription,