summaryrefslogtreecommitdiff
path: root/lisp/server.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2004-03-19 00:50:48 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2004-03-19 00:50:48 +0000
commit5b421c815475955e928c2b2471a96569c81ca55e (patch)
tree39962a41360c168be6e37122ccb7634c261751da /lisp/server.el
parentdd816e0df87d4eb5d7f2e5e6e2b0416588cb6df0 (diff)
downloademacs-5b421c815475955e928c2b2471a96569c81ca55e.tar.gz
(server-process-filter): Delete temp frame.
Diffstat (limited to 'lisp/server.el')
-rw-r--r--lisp/server.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/server.el b/lisp/server.el
index 3a8bede9f95..fe2fc0f59f4 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -305,6 +305,7 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"."
client nowait eval
(files nil)
(lineno 1)
+ (tmp-frame nil) ; Sometimes used to embody the selected display.
(columnno 0))
;; Remove this line from STRING.
(setq string (substring string (match-end 0)))
@@ -319,7 +320,7 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"."
(let ((display (server-unquote-arg (match-string 1 request))))
(setq request (substring request (match-end 0)))
(condition-case err
- (server-select-display display)
+ (setq tmp-frame (server-select-display display))
(error (process-send-string proc (nth 1 err))
(setq request "")))))
;; ARG is a line number option.
@@ -366,7 +367,9 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"."
(run-hooks 'server-switch-hook)
(unless nowait
(message (substitute-command-keys
- "When done with a buffer, type \\[server-edit]")))))))
+ "When done with a buffer, type \\[server-edit]")))))
+ ;; Avoid preserving the connection after the last real frame is deleted.
+ (if tmp-frame (delete-frame tmp-frame))))
;; Save for later any partial line that remains.
(when (> (length string) 0)
(process-put proc 'previous-string string)))