comparison lisp/server.el @ 16060:7e6b741a8b6a

(server-process-filter): Undo the quoting with backslashes that emacsclient now does for special characters. Delete some debugging code accidentally left in.
author Richard M. Stallman <rms@gnu.org>
date Mon, 02 Sep 1996 00:03:28 +0000
parents 0cefc98d243d
children 1fd0ed653ce6
comparison
equal deleted inserted replaced
16059:ad4cd2505623 16060:7e6b741a8b6a
195 (if (string-match "^Client: " request) 195 (if (string-match "^Client: " request)
196 (progn 196 (progn
197 (setq request (substring request (match-end 0))) 197 (setq request (substring request (match-end 0)))
198 (setq client (list (substring request 0 (string-match " " request)))) 198 (setq client (list (substring request 0 (string-match " " request))))
199 (setq request (substring request (match-end 0))) 199 (setq request (substring request (match-end 0)))
200 (setq foofoo request)
201 (while (string-match "[^ ]+ " request) 200 (while (string-match "[^ ]+ " request)
202 (let ((arg 201 (let ((arg
203 (substring request (match-beginning 0) (1- (match-end 0))))) 202 (substring request (match-beginning 0) (1- (match-end 0)))))
204 (setq request (substring request (match-end 0))) 203 (setq request (substring request (match-end 0)))
205 (if (string-match "\\`-nowait" arg) 204 (if (string-match "\\`-nowait" arg)
208 ;; ARG is a line number option. 207 ;; ARG is a line number option.
209 (setq lineno (read (substring arg 1))) 208 (setq lineno (read (substring arg 1)))
210 ;; ARG is a file name. 209 ;; ARG is a file name.
211 ;; Collapse multiple slashes to single slashes. 210 ;; Collapse multiple slashes to single slashes.
212 (setq arg (command-line-normalize-file-name arg)) 211 (setq arg (command-line-normalize-file-name arg))
212 (setq pos 0)
213 ;; Undo the quoting that emacsclient does
214 ;; for certain special characters.
215 (while (string-match "\\\\." arg pos)
216 (setq pos (1+ (match-beginning 0)))
217 (let ((nextchar (aref arg pos)))
218 (cond ((= nextchar ?\\)
219 (setq arg (replace-match "\\" t t arg)))
220 ((= nextchar ?-)
221 (setq arg (replace-match "-" t t arg)))
222 (t
223 (setq arg (replace-match " " t t arg))))))
213 (setq files 224 (setq files
214 (cons (list arg lineno) 225 (cons (list arg lineno)
215 files)) 226 files))
216 (setq lineno 1))))) 227 (setq lineno 1)))))
217 (server-visit-files files client nowait) 228 (server-visit-files files client nowait)