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

add a bang version of delmacros to delete all macros

This commit is contained in:
Doug Kearns
2008-10-06 13:59:15 +00:00
parent 413e01da41
commit 2dd206df47
3 changed files with 11 additions and 5 deletions

View File

@@ -1082,9 +1082,7 @@ liberator.Buffer = function () //{{{
highlight: function (key, style) highlight: function (key, style)
{ {
liberator.log("key: " + key + ", style: " + style);
let [, class, selectors] = key.match(/^([a-zA-Z_-]+)(.*)/); let [, class, selectors] = key.match(/^([a-zA-Z_-]+)(.*)/);
liberator.log("class: " + class + ", selectors: " + selectors);
if (highlightClasses.indexOf(class) == -1) if (highlightClasses.indexOf(class) == -1)
{ {

View File

@@ -677,9 +677,15 @@ liberator.Events = function () //{{{
liberator.commands.add(["delmac[ros]"], liberator.commands.add(["delmac[ros]"],
"Delete macros", "Delete macros",
function (args) { liberator.events.deleteMacros(args); }, function (args, special)
{ {
argCount: "+", // pattern might contain whitespace if (special)
args = ".*"; // XXX
liberator.events.deleteMacros(args);
},
{
bang: true,
completer: function (filter) liberator.completion.macro(filter) completer: function (filter) liberator.completion.macro(filter)
}); });

View File

@@ -25,8 +25,10 @@ ________________________________________________________________________________
|:delmac| |:delmacros| |:delmac| |:delmacros|
||:delmac[ros] {args}|| + ||:delmac[ros] {args}|| +
||:delmac[ros]!||
________________________________________________________________________________ ________________________________________________________________________________
Delete recorded macros matching the regular expression [args]. Delete recorded macros matching the regular expression [args]. If [!] is given
all macros are deleted.
________________________________________________________________________________ ________________________________________________________________________________