diff options
| author | Mark Laws | 2015-02-27 12:43:30 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-02-27 12:43:30 +0200 |
| commit | 805fe507087b9675a010a30a8a8840587ffdf5be (patch) | |
| tree | 9b91858096495590692d1f5fe814cb64d9712f8b /lisp | |
| parent | 6ef14349fa73922473ba8202e256f20e17661b25 (diff) | |
| download | emacs-805fe507087b9675a010a30a8a8840587ffdf5be.tar.gz emacs-805fe507087b9675a010a30a8a8840587ffdf5be.zip | |
Support daemon mode on MS-Windows (bug#19688)
src/emacs.c <w32_daemon_event> [WINDOWSNT]: New global var.
(main) [WINDOWSNT]: Initialize it to NULL. Create the event to
signal clients we are ready for connections.
(Fdaemon_initialized): Use DAEMON_RUNNING.
[WINDOWSNT]: MS-Windows specific code to signal clients we are
ready for connections.
src/lisp.h (DAEMON_RUNNING): New macro, encapsulates Posix and
MS-Windows conditions for running in daemon mode.
src/minibuf.c (read_minibuf): Use DAEMON_RUNNING.
src/keyboard.c (kbd_buffer_get_event): Use DAEMON_RUNNING.
src/dispnew.c (init_display) [WINDOWSNT]: Initialize frames/terminal
even in daemon mode.
nt/inc/ms-w32.h (W32_DAEMON_EVENT): New macro.
lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Don't reject empty
arguments for --alternate-editor.
(print_help_and_exit) [WINDOWSNT]: Don't refrain from advertising
empty arguments for --alternate-editor.
(start_daemon_and_retry_set_socket) [WINDOWSNT]: MS-Windows
specific code to start Emacs in daemon mode and wait for it to be
ready for client connections.
lisp/server.el (server-process-filter): Force GUI frames on
MS-Windows in daemon mode, even if a TTY frame was requested.
lisp/frameset.el (frameset-keep-original-display-p): Don't assume
windows-nt cannot be in daemon mode.
lisp/frame.el (window-system-for-display): Don't assume windows-nt
cannot be in daemon mode.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/frame.el | 3 | ||||
| -rw-r--r-- | lisp/frameset.el | 4 | ||||
| -rw-r--r-- | lisp/server.el | 12 |
4 files changed, 25 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e9f62365f03..b9681d35cf0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2015-02-27 Mark Laws <mdl@60hz.org> | ||
| 2 | |||
| 3 | Support daemon mode on MS-Windows (bug#19688) | ||
| 4 | * server.el (server-process-filter): Force GUI frames on | ||
| 5 | MS-Windows in daemon mode, even if a TTY frame was requested. | ||
| 6 | |||
| 7 | * frameset.el (frameset-keep-original-display-p): Don't assume | ||
| 8 | windows-nt cannot be in daemon mode. | ||
| 9 | |||
| 10 | * frame.el (window-system-for-display): Don't assume windows-nt | ||
| 11 | cannot be in daemon mode. | ||
| 12 | |||
| 1 | 2015-02-26 Ivan Shmakov <ivan@siamics.net> | 13 | 2015-02-26 Ivan Shmakov <ivan@siamics.net> |
| 2 | 14 | ||
| 3 | * faces.el (face-list-p): Split from face-at-point. | 15 | * faces.el (face-list-p): Split from face-at-point. |
diff --git a/lisp/frame.el b/lisp/frame.el index 0096ef9696a..c81ee9bfa61 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -546,7 +546,8 @@ is not considered (see `next-frame')." | |||
| 546 | Return nil if we don't know how to interpret DISPLAY." | 546 | Return nil if we don't know how to interpret DISPLAY." |
| 547 | ;; MS-Windows doesn't know how to create a GUI frame in a -nw session. | 547 | ;; MS-Windows doesn't know how to create a GUI frame in a -nw session. |
| 548 | (if (and (eq system-type 'windows-nt) | 548 | (if (and (eq system-type 'windows-nt) |
| 549 | (null (window-system))) | 549 | (null (window-system)) |
| 550 | (not (daemonp))) | ||
| 550 | nil | 551 | nil |
| 551 | (cl-loop for descriptor in display-format-alist | 552 | (cl-loop for descriptor in display-format-alist |
| 552 | for pattern = (car descriptor) | 553 | for pattern = (car descriptor) |
diff --git a/lisp/frameset.el b/lisp/frameset.el index 4a0637439db..17fe39be844 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el | |||
| @@ -1022,8 +1022,8 @@ Internal use only." | |||
| 1022 | (defun frameset-keep-original-display-p (force-display) | 1022 | (defun frameset-keep-original-display-p (force-display) |
| 1023 | "True if saved frames' displays should be honored. | 1023 | "True if saved frames' displays should be honored. |
| 1024 | For the meaning of FORCE-DISPLAY, see `frameset-restore'." | 1024 | For the meaning of FORCE-DISPLAY, see `frameset-restore'." |
| 1025 | (cond ((daemonp) t) | 1025 | (cond ((eq system-type 'windows-nt) nil) ;; Does ns support more than one display? |
| 1026 | ((eq system-type 'windows-nt) nil) ;; Does ns support more than one display? | 1026 | ((daemonp) t) |
| 1027 | (t (not force-display)))) | 1027 | (t (not force-display)))) |
| 1028 | 1028 | ||
| 1029 | (defun frameset-minibufferless-first-p (frame1 _frame2) | 1029 | (defun frameset-minibufferless-first-p (frame1 _frame2) |
diff --git a/lisp/server.el b/lisp/server.el index 166cd44bb2e..9585b1755c6 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -1139,9 +1139,12 @@ The following commands are accepted by the client: | |||
| 1139 | ;; frame. If running a GUI server, force the frame | 1139 | ;; frame. If running a GUI server, force the frame |
| 1140 | ;; type to GUI. (Cygwin is perfectly happy with | 1140 | ;; type to GUI. (Cygwin is perfectly happy with |
| 1141 | ;; multi-tty support, so don't override the user's | 1141 | ;; multi-tty support, so don't override the user's |
| 1142 | ;; choice there.) | 1142 | ;; choice there.) In daemon mode on Windows, we can't |
| 1143 | ;; make tty frames, so force the frame type to GUI | ||
| 1144 | ;; there too. | ||
| 1143 | (when (and (eq system-type 'windows-nt) | 1145 | (when (and (eq system-type 'windows-nt) |
| 1144 | (eq window-system 'w32)) | 1146 | (or (daemonp) |
| 1147 | (eq window-system 'w32))) | ||
| 1145 | (push "-window-system" args-left))) | 1148 | (push "-window-system" args-left))) |
| 1146 | 1149 | ||
| 1147 | ;; -position LINE[:COLUMN]: Set point to the given | 1150 | ;; -position LINE[:COLUMN]: Set point to the given |
| @@ -1215,7 +1218,10 @@ The following commands are accepted by the client: | |||
| 1215 | terminal-frame))))) | 1218 | terminal-frame))))) |
| 1216 | (setq tty-name nil tty-type nil) | 1219 | (setq tty-name nil tty-type nil) |
| 1217 | (if display (server-select-display display))) | 1220 | (if display (server-select-display display))) |
| 1218 | ((eq tty-name 'window-system) | 1221 | ((or (and (eq system-type 'windows-nt) |
| 1222 | (daemonp) | ||
| 1223 | (setq display "w32")) | ||
| 1224 | (eq tty-name 'window-system)) | ||
| 1219 | (server-create-window-system-frame display nowait proc | 1225 | (server-create-window-system-frame display nowait proc |
| 1220 | parent-id | 1226 | parent-id |
| 1221 | frame-parameters)) | 1227 | frame-parameters)) |