]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
play: Convert com_bg() to lopsub.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 28 Mar 2016 16:55:42 +0000 (16:55 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Mar 2017 09:02:28 +0000 (11:02 +0200)
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
play.c
play.cmd

index adb7e12e51c9af00b63188893e917e33cd151226..d2f12a05921b5e2904eb891034a646efd8d029a9 100644 (file)
@@ -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 e0ff240514fd1a575ac762acbb965cf9bdf0add9..2b43f3552a96c270b454a5b59e88f66061f9d98a 100644 (file)
--- 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)
 {
index 0cc94f95f8dcc6b0aa87893375ecbf722b229075..d6b1396fd2a73b74246bef37eb89700f8889ba20 100644 (file)
--- 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 <percent>