diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-02-04 13:56:51 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-02-04 13:56:51 +0000 |
commit | 6afdd33556870059458b19fb9f064f564cf15a4f (patch) | |
tree | 74d5f0f59c305d48daf76bec4b7a0826521d4962 /lib-src/emacsclient.c | |
parent | e5cdc72372df6f11c73a10c9f3eaec79cba65d61 (diff) | |
download | emacs-6afdd33556870059458b19fb9f064f564cf15a4f.tar.gz |
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/emacsclient.c')
-rw-r--r-- | lib-src/emacsclient.c | 17 |
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", } } + retry: if (nowait) fprintf (out, "-nowait "); @@ -832,14 +833,25 @@ To start the server in Emacs, type \"M-x server-start\".\n", if (strprefix ("-good-version ", str)) { - /* OK, we got the green light. */ + /* -good-version: The versions match. */ } else if (strprefix ("-emacs-pid ", str)) { + /* -emacs-pid PID: The process id of the Emacs process. */ emacs_pid = strtol (string + strlen ("-emacs-pid"), NULL, 10); } + else if (strprefix ("-window-system-unsupported ", str)) + { + /* -window-system-unsupported: Emacs was compiled without X + support. Try again on the terminal. */ + window_system = 0; + nowait = 0; + tty = 1; + goto retry; + } else if (strprefix ("-print ", str)) { + /* -print STRING: Print STRING on the terminal. */ str = unquote_argument (str + strlen ("-print ")); if (needlf) printf ("\n"); @@ -848,6 +860,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", } else if (strprefix ("-error ", str)) { + /* -error DESCRIPTION: Signal an error on the terminal. */ str = unquote_argument (str + strlen ("-error ")); if (needlf) printf ("\n"); @@ -856,6 +869,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", } else if (strprefix ("-suspend ", str)) { + /* -suspend: Suspend this terminal, i.e., stop the process. */ if (needlf) printf ("\n"); needlf = 0; @@ -863,6 +877,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", } else { + /* Unknown command. */ if (needlf) printf ("\n"); printf ("*ERROR*: Unknown message: %s", str); |