comparison lisp/server.el @ 54431:3e8ea09f9375

(server-process-filter): Delete temp frame.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 19 Mar 2004 00:50:48 +0000
parents 367f0279478f
children ea05d398b4d7
comparison
equal deleted inserted replaced
54430:b521d24f538a 54431:3e8ea09f9375
303 (or file-name-coding-system 303 (or file-name-coding-system
304 default-file-name-coding-system))) 304 default-file-name-coding-system)))
305 client nowait eval 305 client nowait eval
306 (files nil) 306 (files nil)
307 (lineno 1) 307 (lineno 1)
308 (tmp-frame nil) ; Sometimes used to embody the selected display.
308 (columnno 0)) 309 (columnno 0))
309 ;; Remove this line from STRING. 310 ;; Remove this line from STRING.
310 (setq string (substring string (match-end 0))) 311 (setq string (substring string (match-end 0)))
311 (setq client (cons proc nil)) 312 (setq client (cons proc nil))
312 (while (string-match "[^ ]* " request) 313 (while (string-match "[^ ]* " request)
317 ((equal "-eval" arg) (setq eval t)) 318 ((equal "-eval" arg) (setq eval t))
318 ((and (equal "-display" arg) (string-match "\\([^ ]*\\) " request)) 319 ((and (equal "-display" arg) (string-match "\\([^ ]*\\) " request))
319 (let ((display (server-unquote-arg (match-string 1 request)))) 320 (let ((display (server-unquote-arg (match-string 1 request))))
320 (setq request (substring request (match-end 0))) 321 (setq request (substring request (match-end 0)))
321 (condition-case err 322 (condition-case err
322 (server-select-display display) 323 (setq tmp-frame (server-select-display display))
323 (error (process-send-string proc (nth 1 err)) 324 (error (process-send-string proc (nth 1 err))
324 (setq request ""))))) 325 (setq request "")))))
325 ;; ARG is a line number option. 326 ;; ARG is a line number option.
326 ((string-match "\\`\\+[0-9]+\\'" arg) 327 ((string-match "\\`\\+[0-9]+\\'" arg)
327 (setq lineno (string-to-int (substring arg 1)))) 328 (setq lineno (string-to-int (substring arg 1))))
364 (unless (or isearch-mode (minibufferp)) 365 (unless (or isearch-mode (minibufferp))
365 (server-switch-buffer (nth 1 client)) 366 (server-switch-buffer (nth 1 client))
366 (run-hooks 'server-switch-hook) 367 (run-hooks 'server-switch-hook)
367 (unless nowait 368 (unless nowait
368 (message (substitute-command-keys 369 (message (substitute-command-keys
369 "When done with a buffer, type \\[server-edit]"))))))) 370 "When done with a buffer, type \\[server-edit]")))))
371 ;; Avoid preserving the connection after the last real frame is deleted.
372 (if tmp-frame (delete-frame tmp-frame))))
370 ;; Save for later any partial line that remains. 373 ;; Save for later any partial line that remains.
371 (when (> (length string) 0) 374 (when (> (length string) 0)
372 (process-put proc 'previous-string string))) 375 (process-put proc 'previous-string string)))
373 376
374 (defun server-goto-line-column (file-line-col) 377 (defun server-goto-line-column (file-line-col)