diff options
author | Joakim Verona <joakim@verona.se> | 2011-12-28 11:34:15 +0100 |
---|---|---|
committer | Joakim Verona <joakim@verona.se> | 2011-12-28 11:34:15 +0100 |
commit | 2f74c36bf173b5ad01f99e0d1b31b9b8fa5c8f2f (patch) | |
tree | 034e65ef002631d0aba8fc1a41e9984fc557e630 /lisp/server.el | |
parent | bb29f044aa967831cd664c54eba0de0c701436ce (diff) | |
parent | d23ab8e8726ecb7e3554644857b4a58e5f7408f1 (diff) | |
download | emacs-2f74c36bf173b5ad01f99e0d1b31b9b8fa5c8f2f.tar.gz emacs-2f74c36bf173b5ad01f99e0d1b31b9b8fa5c8f2f.tar.bz2 emacs-2f74c36bf173b5ad01f99e0d1b31b9b8fa5c8f2f.zip |
upstream
Diffstat (limited to 'lisp/server.el')
-rw-r--r-- | lisp/server.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/server.el b/lisp/server.el index e02f63a8268..edd8f2afa93 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -307,11 +307,13 @@ Updates `server-clients'." (setq server-clients (delq proc server-clients)) - ;; Delete the client's tty. - (let ((terminal (process-get proc 'terminal))) - ;; Only delete the terminal if it is non-nil. - (when (and terminal (eq (terminal-live-p terminal) t)) - (delete-terminal terminal))) + ;; Delete the client's tty, except on Windows (both GUI and console), + ;; where there's only one terminal and does not make sense to delete it. + (unless (eq system-type 'windows-nt) + (let ((terminal (process-get proc 'terminal))) + ;; Only delete the terminal if it is non-nil. + (when (and terminal (eq (terminal-live-p terminal) t)) + (delete-terminal terminal)))) ;; Delete the client's process. (if (eq (process-status proc) 'open) @@ -1035,7 +1037,11 @@ The following commands are accepted by the client: (setq tty-name (pop args-left) tty-type (pop args-left) dontkill (or dontkill - (not use-current-frame)))) + (not use-current-frame))) + ;; On Windows, emacsclient always asks for a tty frame. + ;; If running a GUI server, force the frame type to GUI. + (when (eq window-system 'w32) + (push "-window-system" args-left))) ;; -position LINE[:COLUMN]: Set point to the given ;; position in the next file. |