as per subject, when dobeep_msgs() was introduced some places weren't converted correctly: it already adds a space between the two arguments, so no need to duplicate.
Index: extend.c =================================================================== RCS file: /cvs/src/usr.bin/mg/extend.c,v retrieving revision 1.79 diff -u -p -r1.79 extend.c --- extend.c 30 Mar 2023 22:56:47 -0000 1.79 +++ extend.c 17 Apr 2023 10:00:55 -0000 @@ -493,7 +493,7 @@ redefine_key(int f, int n) return (FALSE); (void)strlcat(buf, tmp, sizeof(buf)); if ((mp = name_map(tmp)) == NULL) - return (dobeep_msgs("Unknown map ", tmp)); + return (dobeep_msgs("Unknown map", tmp)); if (strlcat(buf, "key: ", sizeof(buf)) >= sizeof(buf)) return (FALSE); @@ -720,7 +720,7 @@ excline(char *line, int llen, int lnum) n = (int)nl; } if ((fp = name_function(funcp)) == NULL) - return (dobeep_msgs("Unknown function: ", funcp)); + return (dobeep_msgs("Unknown function:", funcp)); if (fp == bindtokey || fp == unbindtokey) { bind = BINDARG; @@ -847,7 +847,7 @@ excline(char *line, int llen, int lnum) case BINDNEXT: lp->l_text[lp->l_used] = '\0'; if ((curmap = name_map(lp->l_text)) == NULL) { - (void)dobeep_msgs("No such mode: ", lp->l_text); + (void)dobeep_msgs("No such mode:", lp->l_text); status = FALSE; free(lp); goto cleanup; Index: interpreter.c =================================================================== RCS file: /cvs/src/usr.bin/mg/interpreter.c,v retrieving revision 1.34 diff -u -p -r1.34 interpreter.c --- interpreter.c 28 Jan 2022 06:18:41 -0000 1.34 +++ interpreter.c 17 Apr 2023 10:00:55 -0000 @@ -406,7 +406,7 @@ parsexp(char *begp, const char *par1, co * If no extant mg command found, just return. */ if ((funcp = name_function(cmdp)) == NULL) - return (dobeep_msgs("Unknown command: ", cmdp)); + return (dobeep_msgs("Unknown command:", cmdp)); numparams = numparams_function(funcp); if (numparams == 0)