emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master c6a626e: Don't abort emacsclientw when -a was speci


From: Eli Zaretskii
Subject: [Emacs-diffs] master c6a626e: Don't abort emacsclientw when -a was specified
Date: Sun, 02 Aug 2015 14:50:00 +0000

branch: master
commit c6a626ebac9827f23f87ab1774609b35c3046f57
Author: Evgeny Fraimovitch <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Don't abort emacsclientw when -a was specified
    
    * lib-src/emacsclient.c (set_tcp_socket) [WINDOWSNT]: Don't error
    out if we are in emacsclientw and -a was specified.
    
    Copyright-paperwork-exempt: yes
---
 lib-src/emacsclient.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 357ebc7..4426240 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -961,6 +961,13 @@ set_tcp_socket (const char *local_server_file)
   /* Open up an AF_INET socket.  */
   if ((s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
     {
+      /* Since we have an alternate to try out, this is not an error
+        yet; popping out a modal dialog at this stage would make -a
+        option totally useless for emacsclientw -- the user will
+        still get an error message if the alternate editor fails.  */
+#ifdef WINDOWSNT
+      if(!(w32_window_app () && alternate_editor))
+#endif
       sock_err_message ("socket");
       return INVALID_SOCKET;
     }
@@ -968,6 +975,9 @@ set_tcp_socket (const char *local_server_file)
   /* Set up the socket.  */
   if (connect (s, (struct sockaddr *) &server, sizeof server) < 0)
     {
+#ifdef WINDOWSNT
+      if(!(w32_window_app () && alternate_editor))
+#endif
       sock_err_message ("connect");
       return INVALID_SOCKET;
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]