jupyter-repl-kill-buffer-query-function: Update documentation

This commit is contained in:
Nathaniel Nicandro 2021-03-13 11:05:11 -06:00
parent 99c981c1cc
commit 8f66fe872d

View file

@ -1351,15 +1351,14 @@ this method is called."
(jupyter-repl-interaction-mode -1))))) (jupyter-repl-interaction-mode -1)))))
(defun jupyter-repl-kill-buffer-query-function () (defun jupyter-repl-kill-buffer-query-function ()
"Ask before killing a Jupyter REPL buffer. "Ask to shutdown the kernel before killing a Jupyter REPL buffer.
If the REPL buffer is killed, stop the client's channels. When If the current client is not connected to a kernel, kill the
the client is connected to a managed kernel, ask to also shutdown buffer. If the current client is connected to a kernel, only
the kernel. kill the buffer if the user wants to also disconnect the client.
In addition to the above, call the function Before disconnecting the client, deactivate
`jupyter-repl-interaction-mode' in all buffers associated with `jupyter-repl-interaction-mode' in all buffers associated with
the REPL to disable that mode in those buffers. See the REPL."
`jupyter-repl-associate-buffer'."
(when (eq major-mode 'jupyter-repl-mode) (when (eq major-mode 'jupyter-repl-mode)
(let ((connected-p (jupyter-connected-p jupyter-current-client))) (let ((connected-p (jupyter-connected-p jupyter-current-client)))
(or (not connected-p) (or (not connected-p)