emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lib-src ChangeLog emacsclient.c


From: Juanma Barranquero
Subject: [Emacs-diffs] emacs/lib-src ChangeLog emacsclient.c
Date: Wed, 10 Dec 2008 09:47:07 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juanma Barranquero <lektu>      08/12/10 09:47:07

Modified files:
        lib-src        : ChangeLog emacsclient.c 

Log message:
        * emacsclient.c [!WINDOWSNT] (EMACS_DAEMON): New define.
          Changes when EMACS_DAEMON is not defined:
          (print_help_and_exit): Don't add daemon information to help.
          (start_daemon_and_retry_set_socket): Make a no-op.
          (main): Don't set `start_daemon_if_needed' (which is initialized to 
0).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lib-src/ChangeLog?cvsroot=emacs&r1=2.500&r2=2.501
http://cvs.savannah.gnu.org/viewcvs/emacs/lib-src/emacsclient.c?cvsroot=emacs&r1=1.143&r2=1.144

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lib-src/ChangeLog,v
retrieving revision 2.500
retrieving revision 2.501
diff -u -b -r2.500 -r2.501
--- ChangeLog   10 Dec 2008 07:56:51 -0000      2.500
+++ ChangeLog   10 Dec 2008 09:47:06 -0000      2.501
@@ -1,3 +1,11 @@
+2008-12-10  Juanma Barranquero  <address@hidden>
+
+       * emacsclient.c [!WINDOWSNT] (EMACS_DAEMON): New define.
+       Changes when EMACS_DAEMON is not defined:
+       (print_help_and_exit): Don't add daemon information to help.
+       (start_daemon_and_retry_set_socket): Make a no-op.
+       (main): Don't set `start_daemon_if_needed' (which is initialized to 0).
+
 2008-12-10  Dan Nicolaescu  <address@hidden>
 
        * emacsclient.c (print_help_and_exit): Describe what an empty

Index: emacsclient.c
===================================================================
RCS file: /sources/emacs/emacs/lib-src/emacsclient.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -b -r1.143 -r1.144
--- emacsclient.c       10 Dec 2008 07:56:51 -0000      1.143
+++ emacsclient.c       10 Dec 2008 09:47:07 -0000      1.144
@@ -54,6 +54,8 @@
 # define CLOSE_SOCKET close
 # define INITIALIZE()
 
+# define EMACS_DAEMON
+
 #endif /* !WINDOWSNT */
 
 #undef signal
@@ -615,10 +617,12 @@
 "-f, --server-file=FILENAME\n\
                        Set filename of the TCP authentication file\n\
 -a, --alternate-editor=EDITOR\n\
-                       Editor to fallback to if the server is not running\n\
-                        If EDITOR is the empty string, start Emacs in daemon\n\
-                        mode and try connecting again
-\n\
+                       Editor to fallback to if the server is not running\n"
+#ifdef EMACS_DAEMON
+"                      If EDITOR is the empty string, start Emacs in daemon\n\
+                       mode and try connecting again\n"
+#endif
+"\n\
 Report bugs to address@hidden", progname);
   exit (EXIT_SUCCESS);
 }
@@ -1410,12 +1414,12 @@
 }
 #endif
 
-
 /* Start the emacs daemon and try to connect to it.  */
 
 void
 start_daemon_and_retry_set_socket (void)
 {
+#ifdef EMACS_DAEMON
   pid_t dpid;
   int status;
   pid_t p;
@@ -1453,9 +1457,9 @@
       execvp ("emacs", d_argv);
       message (TRUE, "%s: error starting emacs daemon\n", progname);
     }
+#endif /* EMACS_DAEMON */
 }
 
-
 int
 main (argc, argv)
      int argc;
@@ -1464,7 +1468,7 @@
   int i, rl, needlf = 0;
   char *cwd, *str;
   char string[BUFSIZ+1];
-  int null_socket_name, null_server_file, start_daemon_if_needed;
+  int null_socket_name, null_server_file, start_daemon_if_needed = 0;
 
   main_argv = argv;
   progname = argv[0];
@@ -1480,10 +1484,12 @@
       exit (EXIT_FAILURE);
     }
 
+#ifdef EMACS_DAEMON
   /* If alternate_editor is the empty string, start the emacs daemon
      in case of failure to connect.  */
   start_daemon_if_needed = (alternate_editor
                            && (alternate_editor[0] == '\0'));
+#endif /* EMACS_DAEMON */
   if (start_daemon_if_needed)
     {
       /* set_socket changes the values for socket_name and




reply via email to

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