]> code.delx.au - gnu-emacs/blobdiff - lisp/server.el
* lisp/international/characters.el (char-script-table): Fix typo.
[gnu-emacs] / lisp / server.el
index 166cd44bb2ea79818d7ed0cbb069eadfed8fc6ef..2007635b98c5aceac06a5bd76fcbc5457ba38329 100644 (file)
@@ -245,6 +245,7 @@ in this way."
   :type 'boolean
   :version "21.1")
 
+;; FIXME? This is not a minor mode; what's the point of this?  (See bug#20201)
 (or (assq 'server-buffer-clients minor-mode-alist)
     (push '(server-buffer-clients " Server") minor-mode-alist))
 
@@ -650,8 +651,8 @@ server or call `M-x server-force-delete' to forcibly disconnect it.")
                       :name server-name
                       :server t
                       :noquery t
-                      :sentinel 'server-sentinel
-                      :filter 'server-process-filter
+                      :sentinel #'server-sentinel
+                      :filter #'server-process-filter
                       ;; We must receive file names without being decoded.
                       ;; Those are decoded by server-process-filter according
                       ;; to file-name-coding-system.  Also don't get
@@ -839,9 +840,6 @@ This handles splitting the command if it would be bigger than
          (w (or (cdr (assq 'window-system parameters))
                 (window-system-for-display display))))
 
-    (unless (assq w window-system-initialization-alist)
-      (setq w nil))
-
     ;; Special case for ns.  This is because DISPLAY may not be set at all
     ;; which in the ns case isn't an error.  The variable display then becomes
     ;; the fully qualified hostname, which make-frame-on-display below
@@ -849,7 +847,12 @@ This handles splitting the command if it would be bigger than
     ;; It may also be a valid X display, but if Emacs is compiled for ns, it
     ;; can not make X frames.
     (if (featurep 'ns-win)
-       (setq w 'ns display "ns"))
+       (setq w 'ns display "ns")
+      ;; FIXME! Not sure what this was for, and not sure how it should work
+      ;; in the cl-defmethod new world!
+      ;;(unless (assq w window-system-initialization-alist)
+      ;;  (setq w nil))
+      )
 
     (cond (w
            ;; Flag frame as client-created, but use a dummy client.
@@ -1139,9 +1142,12 @@ The following commands are accepted by the client:
                  ;; frame.  If running a GUI server, force the frame
                  ;; type to GUI.  (Cygwin is perfectly happy with
                  ;; multi-tty support, so don't override the user's
-                 ;; choice there.)
+                 ;; choice there.)  In daemon mode on Windows, we can't
+                 ;; make tty frames, so force the frame type to GUI
+                 ;; there too.
                  (when (and (eq system-type 'windows-nt)
-                            (eq window-system 'w32))
+                            (or (daemonp)
+                                (eq window-system 'w32)))
                    (push "-window-system" args-left)))
 
                 ;; -position LINE[:COLUMN]:  Set point to the given
@@ -1164,7 +1170,8 @@ The following commands are accepted by the client:
                    (setq file (expand-file-name file dir))
                    (push (cons file filepos) files)
                    (server-log (format "New file: %s %s"
-                                       file (or filepos "")) proc))
+                                       file (or filepos ""))
+                               proc))
                  (setq filepos nil))
 
                 ;; -eval EXPR:  Evaluate a Lisp expression.
@@ -1215,7 +1222,10 @@ The following commands are accepted by the client:
                                           terminal-frame)))))
                    (setq tty-name nil tty-type nil)
                    (if display (server-select-display display)))
-                  ((eq tty-name 'window-system)
+                  ((or (and (eq system-type 'windows-nt)
+                            (daemonp)
+                            (setq display "w32"))
+                       (eq tty-name 'window-system))
                    (server-create-window-system-frame display nowait proc
                                                       parent-id
                                                       frame-parameters))