server-buffer-done

server-buffer-done is a compiled Lisp function in `server.el'.

(server-buffer-done BUFFER &optional FOR-KILLING)

Mark BUFFER as "done" for its client(s).
This buries the buffer, then returns a list of the form (NEXT-BUFFER KILLED).
NEXT-BUFFER is another server buffer, as a suggestion for what to select next,
or nil. KILLED is t if we killed BUFFER (typically, because it was visiting
a temp file).
FOR-KILLING if non-nil indicates that we are called from `kill-buffer'.