diff options
| author | Juanma Barranquero | 2011-12-04 18:13:01 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2011-12-04 18:13:01 +0100 |
| commit | 520fca41d6ca6cc860c1f03c76cd472ea149e33a (patch) | |
| tree | ae940593c2033d55da3e51b113a12bca88a9e816 /lisp | |
| parent | ec7ae0329e5cfda066433f8c5d5daa6e0d1dde14 (diff) | |
| download | emacs-520fca41d6ca6cc860c1f03c76cd472ea149e33a.tar.gz emacs-520fca41d6ca6cc860c1f03c76cd472ea149e33a.zip | |
Fix emacsclient bug where "-n -c" does not open a new frame on Windows.
* lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Don't force tty = 0;
instead, treat both -c and -t as always requesting a new "tty" frame,
and let server.el decide which kind is actually required.
Reported by Uwe Siart <usenet@siart.de> in this thread:
http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00303.html
* lisp/server.el (server-delete-client): On Windows, do not try to delete
the only terminal.
(server-process-filter): On Windows, treat requests for a tty frame as
if they were for a GUI frame if the running server is in GUI mode.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/server.el | 18 |
2 files changed, 19 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c77ace6d483..3d09a225da0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-12-04 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * server.el (server-delete-client): On Windows, do not try to delete | ||
| 4 | the only terminal. | ||
| 5 | (server-process-filter): On Windows, treat requests for a tty frame as | ||
| 6 | if they were for a GUI frame if the running server is in GUI mode. | ||
| 7 | |||
| 1 | 2011-12-03 Glenn Morris <rgm@gnu.org> | 8 | 2011-12-03 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * textmodes/texinfmt.el (batch-texinfo-format): Doc fix. (Bug#10207) | 10 | * textmodes/texinfmt.el (batch-texinfo-format): Doc fix. (Bug#10207) |
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'." | |||
| 307 | 307 | ||
| 308 | (setq server-clients (delq proc server-clients)) | 308 | (setq server-clients (delq proc server-clients)) |
| 309 | 309 | ||
| 310 | ;; Delete the client's tty. | 310 | ;; Delete the client's tty, except on Windows (both GUI and console), |
| 311 | (let ((terminal (process-get proc 'terminal))) | 311 | ;; where there's only one terminal and does not make sense to delete it. |
| 312 | ;; Only delete the terminal if it is non-nil. | 312 | (unless (eq system-type 'windows-nt) |
| 313 | (when (and terminal (eq (terminal-live-p terminal) t)) | 313 | (let ((terminal (process-get proc 'terminal))) |
| 314 | (delete-terminal terminal))) | 314 | ;; Only delete the terminal if it is non-nil. |
| 315 | (when (and terminal (eq (terminal-live-p terminal) t)) | ||
| 316 | (delete-terminal terminal)))) | ||
| 315 | 317 | ||
| 316 | ;; Delete the client's process. | 318 | ;; Delete the client's process. |
| 317 | (if (eq (process-status proc) 'open) | 319 | (if (eq (process-status proc) 'open) |
| @@ -1035,7 +1037,11 @@ The following commands are accepted by the client: | |||
| 1035 | (setq tty-name (pop args-left) | 1037 | (setq tty-name (pop args-left) |
| 1036 | tty-type (pop args-left) | 1038 | tty-type (pop args-left) |
| 1037 | dontkill (or dontkill | 1039 | dontkill (or dontkill |
| 1038 | (not use-current-frame)))) | 1040 | (not use-current-frame))) |
| 1041 | ;; On Windows, emacsclient always asks for a tty frame. | ||
| 1042 | ;; If running a GUI server, force the frame type to GUI. | ||
| 1043 | (when (eq window-system 'w32) | ||
| 1044 | (push "-window-system" args-left))) | ||
| 1039 | 1045 | ||
| 1040 | ;; -position LINE[:COLUMN]: Set point to the given | 1046 | ;; -position LINE[:COLUMN]: Set point to the given |
| 1041 | ;; position in the next file. | 1047 | ;; position in the next file. |