Close window when hiding current shell
For eshell we do the same.
This commit is contained in:
parent
1252023886
commit
ac815a06f1
@ -62,14 +62,13 @@ If already in `*ansi-term*' buffer, bury it."
|
|||||||
(find-file user-init-file))
|
(find-file user-init-file))
|
||||||
|
|
||||||
(defun db/run-or-hide-shell ()
|
(defun db/run-or-hide-shell ()
|
||||||
"Opens an shell buffer if not already in one, and otherwise
|
"Opens an shell buffer if not already in one, and closes it
|
||||||
returns to where we have been before."
|
otherwise."
|
||||||
(interactive "")
|
(interactive "")
|
||||||
(if (string= "shell-mode" major-mode)
|
(if (not (eq 'shell-mode major-mode))
|
||||||
(progn
|
(shell)
|
||||||
(bury-buffer)
|
(bury-buffer)
|
||||||
(other-window -1))
|
(delete-window)))
|
||||||
(shell)))
|
|
||||||
|
|
||||||
|
|
||||||
;;; General Utilities
|
;;; General Utilities
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user