mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-23 18:47:57 +00:00
*** empty log message ***
This commit is contained in:
parent
82febc13c3
commit
b53d289e7a
@ -75,6 +75,8 @@
|
|||||||
(defvar server-process nil
|
(defvar server-process nil
|
||||||
"the current server process")
|
"the current server process")
|
||||||
|
|
||||||
|
(defvar server-previous-string "")
|
||||||
|
|
||||||
(defvar server-clients nil
|
(defvar server-clients nil
|
||||||
"List of current server clients.
|
"List of current server clients.
|
||||||
Each element is (CLIENTID FILES...) where CLIENTID is a string
|
Each element is (CLIENTID FILES...) where CLIENTID is a string
|
||||||
@ -144,9 +146,14 @@ Prefix arg means just kill any existing server communications subprocess."
|
|||||||
;Format of STRING is "Client: CLIENTID PATH PATH PATH... \n"
|
;Format of STRING is "Client: CLIENTID PATH PATH PATH... \n"
|
||||||
(defun server-process-filter (proc string)
|
(defun server-process-filter (proc string)
|
||||||
(server-log string)
|
(server-log string)
|
||||||
(if (not (eq 0 (string-match "Client: " string)))
|
(setq string (concat server-previous-string string))
|
||||||
nil
|
(if (not (and (eq ?\n (aref string (1- (length string))))
|
||||||
|
(eq 0 (string-match "Client: " string))))
|
||||||
|
;; If input is not complete, save it for later.
|
||||||
|
(setq server-previous-string string)
|
||||||
|
;; If it is complete, process it now, and discard what was saved.
|
||||||
(setq string (substring string (match-end 0)))
|
(setq string (substring string (match-end 0)))
|
||||||
|
(setq server-previous-string "")
|
||||||
(let ((client (list (substring string 0 (string-match " " string))))
|
(let ((client (list (substring string 0 (string-match " " string))))
|
||||||
(files nil)
|
(files nil)
|
||||||
(lineno 1))
|
(lineno 1))
|
||||||
|
Loading…
Reference in New Issue
Block a user