# HG changeset patch # User Richard M. Stallman <rms@gnu.org> # Date 739823324 0 # Node ID 65d530f613a8c2d3e3d766a3139bb78a9d31bc09 # Parent 41a282d1b176f0a348c5426b350129baa76c86ef (server-window): New variable. (server-switch-buffer): Use it. diff -r 41a282d1b176 -r 65d530f613a8 lisp/server.el --- 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))