diff lisp/server.el @ 91056:1251cabc40b7

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 890-898) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 122-128) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 257-258) - Merge from emacs--rel--22 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
author Miles Bader <miles@gnu.org>
date Fri, 19 Oct 2007 00:00:21 +0000
parents d38543a1c0f9 a10ee3a5c9ce
children 880960b70474
line wrap: on
line diff
--- a/lisp/server.el	Mon Oct 15 15:43:53 2007 +0000
+++ b/lisp/server.el	Fri Oct 19 00:00:21 2007 +0000
@@ -325,7 +325,10 @@
 
 (defun server-select-display (display)
   ;; If the current frame is on `display' we're all set.
-  (unless (equal (frame-parameter (selected-frame) 'display) display)
+  ;; Similarly if we are unable to open a frames on other displays, there's
+  ;; nothing more we can do.
+  (unless (or (not (fboundp 'make-frame-on-display))
+              (equal (frame-parameter (selected-frame) 'display) display))
     ;; Otherwise, look for an existing frame there and select it.
     (dolist (frame (frame-list))
       (when (equal (frame-parameter frame 'display) display)
@@ -505,11 +508,11 @@
 	  (when server-use-tcp
 	    (let ((auth-key
 		   (loop
-		    ;; The auth key is a 64-byte string of random chars in the
-		    ;; range `!'..`~'.
-		    for i below 64
-		    collect (+ 33 (random 94)) into auth
-		    finally return (concat auth))))
+		      ;; The auth key is a 64-byte string of random chars in the
+		      ;; range `!'..`~'.
+		      for i below 64
+		      collect (+ 33 (random 94)) into auth
+		      finally return (concat auth))))
 	      (process-put server-process :auth-key auth-key)
 	      (with-temp-file server-file
 		(set-buffer-multibyte nil)
@@ -831,8 +834,8 @@
 		 ;; Open X frames on the given display instead of the default.
 		 ((and (equal "-display" arg)
                        (string-match "\\([^ ]*\\) " request))
-		  (setq display (match-string 1 request)
-			request (substring request (match-end 0))))
+                  (setq display (match-string 1 request))
+		  (setq request (substring request (match-end 0))))
 
 		 ;; -window-system:  Open a new X frame.
 		 ((equal "-window-system" arg)