aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-06-27 20:59:50 +0200
committerLars Ingebrigtsen2019-06-27 21:00:36 +0200
commit6fe661342a24edcaea255c3ba9a37613031554da (patch)
tree0cd3beedc498f228cc9cdf03b88471a8faf83f5b /lib-src
parent9997429cb7f960a1a08c7dfb4848a0cb60107f57 (diff)
downloademacs-6fe661342a24edcaea255c3ba9a37613031554da.tar.gz
emacs-6fe661342a24edcaea255c3ba9a37613031554da.zip
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).
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)
700{ 700{
701 if (alternate_editor) 701 if (alternate_editor)
702 { 702 {
703 size_t extra_args_size = (main_argc - optind + 1) * sizeof (char *); 703 /* If the user has said --eval, then those aren't file name
704 parameters, so don't put them on the alternate_editor command
705 line. */
706 size_t extra_args_size =
707 (eval? 0: (main_argc - optind + 1) * sizeof (char *));
704 size_t new_argv_size = extra_args_size; 708 size_t new_argv_size = extra_args_size;
705 char **new_argv = xmalloc (new_argv_size); 709 char **new_argv = xmalloc (new_argv_size);
706 char *s = xstrdup (alternate_editor); 710 char *s = xstrdup (alternate_editor);