[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6fe6613 5/5: emacsclient: ignore --eval parameters
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 6fe6613 5/5: emacsclient: ignore --eval parameters when starting alternate editor |
Date: |
Thu, 27 Jun 2019 15:00:47 -0400 (EDT) |
branch: master
commit 6fe661342a24edcaea255c3ba9a37613031554da
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
emacsclient: ignore --eval parameters when starting alternate editor
* lib-src/emacsclient.c (fail): If the user said --eval, don't
pass those arguments to the alternate editor as file names.
Suggested by a patch from Scott Turner (bug#11474).
---
lib-src/emacsclient.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 39dd10e..ba2721e 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);