diff options
| author | Richard M. Stallman | 1990-12-12 05:12:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1990-12-12 05:12:45 +0000 |
| commit | b53d289e7aa61b4abdb9d068d8fcb434c688258a (patch) | |
| tree | 7580562c2caf1eb9db2ce87591c169530024e38c | |
| parent | 82febc13c38f2178346365e8cb20f6e93a4ae7df (diff) | |
| download | emacs-b53d289e7aa61b4abdb9d068d8fcb434c688258a.tar.gz emacs-b53d289e7aa61b4abdb9d068d8fcb434c688258a.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/server.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/server.el b/lisp/server.el index ea2defdd161..f6518777d2c 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -75,6 +75,8 @@ | |||
| 75 | (defvar server-process nil | 75 | (defvar server-process nil |
| 76 | "the current server process") | 76 | "the current server process") |
| 77 | 77 | ||
| 78 | (defvar server-previous-string "") | ||
| 79 | |||
| 78 | (defvar server-clients nil | 80 | (defvar server-clients nil |
| 79 | "List of current server clients. | 81 | "List of current server clients. |
| 80 | Each element is (CLIENTID FILES...) where CLIENTID is a string | 82 | Each element is (CLIENTID FILES...) where CLIENTID is a string |
| @@ -144,9 +146,14 @@ Prefix arg means just kill any existing server communications subprocess." | |||
| 144 | ;Format of STRING is "Client: CLIENTID PATH PATH PATH... \n" | 146 | ;Format of STRING is "Client: CLIENTID PATH PATH PATH... \n" |
| 145 | (defun server-process-filter (proc string) | 147 | (defun server-process-filter (proc string) |
| 146 | (server-log string) | 148 | (server-log string) |
| 147 | (if (not (eq 0 (string-match "Client: " string))) | 149 | (setq string (concat server-previous-string string)) |
| 148 | nil | 150 | (if (not (and (eq ?\n (aref string (1- (length string)))) |
| 151 | (eq 0 (string-match "Client: " string)))) | ||
| 152 | ;; If input is not complete, save it for later. | ||
| 153 | (setq server-previous-string string) | ||
| 154 | ;; If it is complete, process it now, and discard what was saved. | ||
| 149 | (setq string (substring string (match-end 0))) | 155 | (setq string (substring string (match-end 0))) |
| 156 | (setq server-previous-string "") | ||
| 150 | (let ((client (list (substring string 0 (string-match " " string)))) | 157 | (let ((client (list (substring string 0 (string-match " " string)))) |
| 151 | (files nil) | 158 | (files nil) |
| 152 | (lineno 1)) | 159 | (lineno 1)) |