summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2026-02-08 16:52:12 +0000
committerSean Whitton <spwhitton@spwhitton.name>2026-02-08 16:52:12 +0000
commit7fd6fa4a8b71615fa21dc990503736d4405193c6 (patch)
tree1adb294840c138cc13963b9d99daef0fb9d18dca /lib-src
parent01d8abea0453fe4f0ffdf85c0a37f3fb33c7e1dd (diff)
Revert "Extend emacs server protocol for empty arguments"
This reverts this change: Author: Andreas Schwab <schwab@linux-m68k.org> AuthorDate: Sun Feb 8 12:34:02 2026 +0100 Extend emacs server protocol for empty arguments An empty argument is represented by &0. On the receiving side, &0 is replaced by nothing. * lisp/server.el (server-unquote-arg): Replace "&0" by nothing. (server-quote-arg): Produce "&0" for an empty string. * lib-src/emacsclient.c (quote_argument): Produce "&0" for an empty string. (unquote_argument): Replace "&0" by nothing. (Bug#80356) The bug in question was already fixed by this change: Author: Sean Whitton <spwhitton@spwhitton.name> AuthorDate: Fri Nov 7 12:33:21 2025 +0000 Don't discard empty string arguments from emacsclient * lisp/server.el (server--process-filter-1): Don't discard empty string arguments from emacsclient. (server-eval-args-left): * doc/emacs/misc.texi (emacsclient Options): * etc/NEWS: Document the change.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index ba08d7dd6d3..4f3215ea6b1 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -867,10 +867,8 @@ send_to_emacs (HSOCKET s, const char *data)
static void
quote_argument (HSOCKET s, const char *str)
{
- char *copy = xmalloc (strlen (str) * 2 + 3);
+ char *copy = xmalloc (strlen (str) * 2 + 1);
char *q = copy;
- if (*str == '\0')
- *q++ = '&', *q++ = '0';
if (*str == '-')
*q++ = '&', *q++ = *str++;
for (; *str; str++)
@@ -912,8 +910,6 @@ unquote_argument (char *str)
c = ' ';
else if (c == 'n')
c = '\n';
- else if (c == '0')
- continue;
}
*q++ = c;
}