summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 39dd10e7fb1..ba2721e8bc9 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -700,7 +700,11 @@ fail (void)
{
if (alternate_editor)
{
- size_t extra_args_size = (main_argc - optind + 1) * sizeof (char *);
+ /* If the user has said --eval, then those aren't file name
+ parameters, so don't put them on the alternate_editor command
+ line. */
+ size_t extra_args_size =
+ (eval? 0: (main_argc - optind + 1) * sizeof (char *));
size_t new_argv_size = extra_args_size;
char **new_argv = xmalloc (new_argv_size);
char *s = xstrdup (alternate_editor);