aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-02-04 13:56:51 +0000
committerKaroly Lorentey2005-02-04 13:56:51 +0000
commit6afdd33556870059458b19fb9f064f564cf15a4f (patch)
tree74d5f0f59c305d48daf76bec4b7a0826521d4962 /lib-src
parente5cdc72372df6f11c73a10c9f3eaec79cba65d61 (diff)
downloademacs-6afdd33556870059458b19fb9f064f564cf15a4f.tar.gz
emacs-6afdd33556870059458b19fb9f064f564cf15a4f.zip
Prevent emacsclient errors when Emacs is compiled without X support.
* lisp/frame.el (make-frame-on-display): Protect condition on x-initialized when x-win.el is not loaded. * lib-src/emacsclient.c (main): Handle -window-system-unsupported command. Doc update. * lisp/server.el (server-process-filter): Don't try to create an X frame when Emacs does not support it. Improve logging. * lisp/server.el (server-send-string): New function. (server-handle-suspend-tty, server-process-filter): Use it. * lisp/server.el (server-process-filter, server-unquote-arg) (server-quote-arg): Doc updates. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-286
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 888c85e8685..fbe719772b9 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -704,6 +704,7 @@ To start the server in Emacs, type \"M-x server-start\".\n",
704 } 704 }
705 } 705 }
706 706
707 retry:
707 if (nowait) 708 if (nowait)
708 fprintf (out, "-nowait "); 709 fprintf (out, "-nowait ");
709 710
@@ -832,14 +833,25 @@ To start the server in Emacs, type \"M-x server-start\".\n",
832 833
833 if (strprefix ("-good-version ", str)) 834 if (strprefix ("-good-version ", str))
834 { 835 {
835 /* OK, we got the green light. */ 836 /* -good-version: The versions match. */
836 } 837 }
837 else if (strprefix ("-emacs-pid ", str)) 838 else if (strprefix ("-emacs-pid ", str))
838 { 839 {
840 /* -emacs-pid PID: The process id of the Emacs process. */
839 emacs_pid = strtol (string + strlen ("-emacs-pid"), NULL, 10); 841 emacs_pid = strtol (string + strlen ("-emacs-pid"), NULL, 10);
840 } 842 }
843 else if (strprefix ("-window-system-unsupported ", str))
844 {
845 /* -window-system-unsupported: Emacs was compiled without X
846 support. Try again on the terminal. */
847 window_system = 0;
848 nowait = 0;
849 tty = 1;
850 goto retry;
851 }
841 else if (strprefix ("-print ", str)) 852 else if (strprefix ("-print ", str))
842 { 853 {
854 /* -print STRING: Print STRING on the terminal. */
843 str = unquote_argument (str + strlen ("-print ")); 855 str = unquote_argument (str + strlen ("-print "));
844 if (needlf) 856 if (needlf)
845 printf ("\n"); 857 printf ("\n");
@@ -848,6 +860,7 @@ To start the server in Emacs, type \"M-x server-start\".\n",
848 } 860 }
849 else if (strprefix ("-error ", str)) 861 else if (strprefix ("-error ", str))
850 { 862 {
863 /* -error DESCRIPTION: Signal an error on the terminal. */
851 str = unquote_argument (str + strlen ("-error ")); 864 str = unquote_argument (str + strlen ("-error "));
852 if (needlf) 865 if (needlf)
853 printf ("\n"); 866 printf ("\n");
@@ -856,6 +869,7 @@ To start the server in Emacs, type \"M-x server-start\".\n",
856 } 869 }
857 else if (strprefix ("-suspend ", str)) 870 else if (strprefix ("-suspend ", str))
858 { 871 {
872 /* -suspend: Suspend this terminal, i.e., stop the process. */
859 if (needlf) 873 if (needlf)
860 printf ("\n"); 874 printf ("\n");
861 needlf = 0; 875 needlf = 0;
@@ -863,6 +877,7 @@ To start the server in Emacs, type \"M-x server-start\".\n",
863 } 877 }
864 else 878 else
865 { 879 {
880 /* Unknown command. */
866 if (needlf) 881 if (needlf)
867 printf ("\n"); 882 printf ("\n");
868 printf ("*ERROR*: Unknown message: %s", str); 883 printf ("*ERROR*: Unknown message: %s", str);