1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 13:44:11 +01:00

Add PrivateMode autocommand. Add -js flag to :au

This commit is contained in:
Kris Maglione
2009-06-28 15:14:23 -04:00
parent 7c7710b23d
commit c4e9e414be
5 changed files with 24 additions and 12 deletions

View File

@@ -87,6 +87,8 @@ function AutoCommands() //{{{
{
if (args.bang)
autocommands.remove(event, regex);
if (args["-javascript"])
cmd = eval("(function(args) { with(args) {" + cmd + "} })");
autocommands.add(events, regex, cmd);
}
else
@@ -107,7 +109,8 @@ function AutoCommands() //{{{
{
bang: true,
completer: function (context) completion.autocmdEvent(context),
literal: 2
literal: 2,
options: [[["-javascript", "-js"], commands.OPTION_NOARG]]
});
// TODO: expand target to all buffers