Define -print-nonl client command
* lib-src/emacsclient.c (main): Handle -print-nonl command. * lisp/server.el (server-msg-size): New constant. (server-reply-print): New function. (server-eval-and-print): Use it. (server-eval-at): Use server-quote-arg and server-unquote-arg. Handle -print-nonl.
This commit is contained in:
parent
de5939bafc
commit
e29ab36b48
4 changed files with 56 additions and 11 deletions
|
@ -1812,6 +1812,14 @@ main (int argc, char **argv)
|
|||
printf ("%s", str);
|
||||
needlf = str[0] == '\0' ? needlf : str[strlen (str) - 1] != '\n';
|
||||
}
|
||||
else if (strprefix ("-print-nonl ", p))
|
||||
{
|
||||
/* -print-nonl STRING: Print STRING on the terminal.
|
||||
Used to continue a preceding -print command. */
|
||||
str = unquote_argument (p + strlen ("-print-nonl "));
|
||||
printf ("%s", str);
|
||||
needlf = str[0] == '\0' ? needlf : str[strlen (str) - 1] != '\n';
|
||||
}
|
||||
else if (strprefix ("-error ", p))
|
||||
{
|
||||
/* -error DESCRIPTION: Signal an error on the terminal. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue