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; } diff --git a/lisp/server.el b/lisp/server.el index 88b370d15a2..fcfc6c01972 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -531,7 +531,6 @@ See `server-quote-arg' and `server-process-filter'." (?& "&") (?- "-") (?n "\n") - (?0 "") (_ " "))) arg t t)) @@ -539,19 +538,16 @@ See `server-quote-arg' and `server-process-filter'." "In ARG, insert a & before each &, each space, each newline, and -. Change spaces to underscores, too, so that the return value never contains a space. -An empty ARG is represented by &0. See `server-unquote-arg' and `server-process-filter'." - (if (equal arg "") - "&0" - (replace-regexp-in-string - "[-&\n ]" (lambda (s) - (pcase (aref s 0) - (?& "&&") - (?- "&-") - (?\n "&n") - (?\s "&_"))) - arg t t))) + (replace-regexp-in-string + "[-&\n ]" (lambda (s) + (pcase (aref s 0) + (?& "&&") + (?- "&-") + (?\n "&n") + (?\s "&_"))) + arg t t)) (defun server-send-string (proc string) "A wrapper around `process-send-string' for logging."