Close window when hiding current shell

For eshell we do the same.
This commit is contained in:
Daniel Borchmann 2020-07-12 13:00:28 +02:00
parent 1252023886
commit ac815a06f1
Signed by: exot
GPG Key ID: 1C7071A75BB72D64

View File

@ -62,14 +62,13 @@ If already in `*ansi-term*' buffer, bury it."
(find-file user-init-file))
(defun db/run-or-hide-shell ()
"Opens an shell buffer if not already in one, and otherwise
returns to where we have been before."
"Opens an shell buffer if not already in one, and closes it
otherwise."
(interactive "")
(if (string= "shell-mode" major-mode)
(progn
(if (not (eq 'shell-mode major-mode))
(shell)
(bury-buffer)
(other-window -1))
(shell)))
(delete-window)))
;;; General Utilities