aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1999-03-13 00:21:24 +0000
committerKenichi Handa1999-03-13 00:21:24 +0000
commit6b7430a8ac2ef755daac223728c0e784bbd1ce4b (patch)
tree87a5bed64d5383c59ad3cfc3ba753932c27c0b97
parentbdcb0e25c99d08256eaeaa34ef75006010d90f76 (diff)
downloademacs-6b7430a8ac2ef755daac223728c0e784bbd1ce4b.tar.gz
emacs-6b7430a8ac2ef755daac223728c0e784bbd1ce4b.zip
(server-start): Set coding system for the server
process to raw-text. (server-process-filter): Decode file names if necessary.
-rw-r--r--lisp/server.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 5a8720e377e..89e3710b329 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -195,6 +195,10 @@ Prefix arg means just kill any existing server communications subprocess."
195 (setq server-process (start-process "server" nil server-program))) 195 (setq server-process (start-process "server" nil server-program)))
196 (set-process-sentinel server-process 'server-sentinel) 196 (set-process-sentinel server-process 'server-sentinel)
197 (set-process-filter server-process 'server-process-filter) 197 (set-process-filter server-process 'server-process-filter)
198 ;; We must receive file names without being decoded. Those are
199 ;; decoded by server-process-filter accoding to
200 ;; file-name-coding-system.
201 (set-process-coding-system server-process 'raw-text 'raw-text)
198 (process-kill-without-query server-process))) 202 (process-kill-without-query server-process)))
199 203
200;Process a request from the server to edit some files. 204;Process a request from the server to edit some files.
@@ -206,6 +210,9 @@ Prefix arg means just kill any existing server communications subprocess."
206 ;; process each line individually. 210 ;; process each line individually.
207 (while (string-match "\n" string) 211 (while (string-match "\n" string)
208 (let ((request (substring string 0 (match-beginning 0))) 212 (let ((request (substring string 0 (match-beginning 0)))
213 (coding-system (and default-enable-multibyte-characters
214 (or file-name-coding-system
215 default-file-name-coding-system)))
209 client nowait 216 client nowait
210 (files nil) 217 (files nil)
211 (lineno 1)) 218 (lineno 1))
@@ -242,6 +249,9 @@ Prefix arg means just kill any existing server communications subprocess."
242 (setq arg (replace-match "-" t t arg))) 249 (setq arg (replace-match "-" t t arg)))
243 (t 250 (t
244 (setq arg (replace-match " " t t arg)))))) 251 (setq arg (replace-match " " t t arg))))))
252 ;; Now decode the file name if necessary.
253 (if coding-system
254 (setq arg (decode-coding-string arg coding-system)))
245 (setq files 255 (setq files
246 (cons (list arg lineno) 256 (cons (list arg lineno)
247 files)) 257 files))