add ein:quit to easily exit EIN without killing Emacs

This commit is contained in:
Sam Steingold 2019-11-18 10:43:04 -05:00
parent da378d518a
commit 3f275425fd

View file

@ -1783,6 +1783,13 @@ the first argument and CBARGS as the rest of arguments."
(add-hook 'kill-emacs-query-functions 'ein:notebook-close-notebooks t)
(defun ein:quit (&optional force)
"Close all notebooks and servers."
(interactive "P")
(ein:notebook-close-notebooks force)
(ein:jupyter-server-stop force)) ; autoloaded
(defun ein:notebook-kill-buffer-callback ()
"Call notebook destructor. This function is called via `kill-buffer-hook'."
;; TODO - it remains a bug that neither `ein:notebook-kill-buffer-callback'