changeset 3661:65d530f613a8

(server-window): New variable. (server-switch-buffer): Use it.
author Richard M. Stallman <rms@gnu.org>
date Fri, 11 Jun 1993 18:28:44 +0000
parents 41a282d1b176
children edba0072c7ef
files lisp/server.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/server.el	Fri Jun 11 17:55:51 1993 +0000
+++ b/lisp/server.el	Fri Jun 11 18:28:44 1993 +0000
@@ -98,6 +98,11 @@
 ;; Changing major modes should not erase this local.
 (put 'server-buffer-clients 'permanent-local t)
 
+(defvar server-window nil
+  "*The window to use for selecting Emacs server buffers.
+If nil, use the selected window.
+If it is a frame, use the frame's selected window.")
+
 (defvar server-temp-file-regexp "^/tmp/Re\\|/draft$"
   "*Regexp which should match filenames of temporary files
 which are deleted and reused after each edit
@@ -294,6 +299,10 @@
 (defun server-switch-buffer (next-buffer)
   "Switch to another buffer, preferably one that has a client.
 Arg NEXT-BUFFER is a suggestion; if it is a live buffer, use it."
+  (cond ((windowp server-window)
+	 (select-window server-window))
+	((framep server-window)
+	 (select-window (frame-selected-window server-window))))
   (if next-buffer
       (if (and (bufferp next-buffer)
 	       (buffer-name next-buffer))