From d68567a43e3fd04d95872f99711e8ffa223386f9 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 28 Mar 2016 16:55:42 +0000 Subject: [PATCH] play: Convert com_bg() to lopsub. There is not much to convert since the command takes no arguments, and thus lpr is unused. The commit gets rid of the argc check which is performed by lopsub and fixes a typo in the command summary: s/input/insert. --- m4/lls/play_cmd.suite.m4 | 8 ++++++++ play.c | 6 +++--- play.cmd | 7 ------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/m4/lls/play_cmd.suite.m4 b/m4/lls/play_cmd.suite.m4 index adb7e12e..d2f12a05 100644 --- a/m4/lls/play_cmd.suite.m4 +++ b/m4/lls/play_cmd.suite.m4 @@ -25,3 +25,11 @@ caption = list of commands [subcommand prev] purpose = load the previous file of the playlist + +[subcommand bg] + purpose = enter insert mode + [description] + Only useful if called in command mode via a key binding. The default + key bindings map the colon key to this command, so pressing : in + command mode activates insert mode. + [/description] diff --git a/play.c b/play.c index e0ff2405..2b43f355 100644 --- a/play.c +++ b/play.c @@ -947,13 +947,13 @@ static int com_fg(struct play_task *pt, } EXPORT_PLAY_CMD_HANDLER(fg); -static int com_bg(struct play_task *pt, int argc, __a_unused char **argv) +static int com_bg(struct play_task *pt, + __a_unused struct lls_parse_result *lpr) { - if (argc != 1) - return -E_PLAY_SYNTAX; pt->background = true; return 0; } +EXPORT_PLAY_CMD_HANDLER(bg); static int com_jmp(struct play_task *pt, int argc, char **argv) { diff --git a/play.cmd b/play.cmd index 0cc94f95..d6b1396f 100644 --- a/play.cmd +++ b/play.cmd @@ -2,13 +2,6 @@ BN: play SF: play.c SN: list of commands --- -N: bg -D: Enter input mode. -U: bg -H: Only useful if called in command mode via a key binding. The default key -H: bindings map this command to the colon key, so pressing : in command mode -H: activates insert mode. ---- N: jmp D: Jump to position in current file. U: jmp -- 2.39.5