Add my/always-use-eat
This commit is contained in:
parent
2d072241a7
commit
997be323f5
6
init.el
6
init.el
@ -2663,11 +2663,15 @@ If no name is given, list all bookmarks instead."
|
||||
|
||||
(defvar my/eshell-or-eat-hook nil
|
||||
"Hook to determine weather `my/open-shell-dwin' uses `eshell' or `eat'.")
|
||||
(defvar my/always-use-eat nil
|
||||
"Make `my/open-shell-dwim' always use eat.")
|
||||
(put 'my/always-use-eat 'safe-local-variable 'booleanp)
|
||||
(defun my/open-shell-dwim (&optional arg)
|
||||
"Open either an `eshell' or `eat' terminal based on `my/eshell-or-eat-hook'.
|
||||
ARG is the same as for either of the above functions."
|
||||
(interactive "P")
|
||||
(if (run-hook-with-args-until-success 'my/eshell-or-eat-hook)
|
||||
(if (or my/always-use-eat
|
||||
(run-hook-with-args-until-success 'my/eshell-or-eat-hook))
|
||||
(my/project-eat-or-default arg)
|
||||
(my/project-eshell-or-default arg)))
|
||||
(keymap-global-set "C-c v" #'my/open-shell-dwim)
|
||||
|
Loading…
x
Reference in New Issue
Block a user