Commit ec40ed9f authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(server-window): New variable.

(server-switch-buffer): Use it.
parent 1bc1c75e
......@@ -98,6 +98,11 @@ When a buffer is marked as \"done\", it is removed from this list.")
;; 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 @@ starts server process and that is all. Invoked by \\[server-edit]."
(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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment