Use Eshell "emacs" mode map when process is live
* eat.el (eat-eshell-emacs-mode-map): Update docstring. * eat.el (eat--eshell-process-running-mode): New non-interactive minor mode. * eat.el (eat--eshell-setup-proc-and-term): Enable 'eat--eshell-process-running-mode'. * eat.el (eat--eshell-cleanup): Disable 'eat--eshell-process-running-mode'. * eat.le (eat--eshell-local-mode): Don't use 'eat-eshell-emacs-mode-map' as the mode keymap.
This commit is contained in:
parent
7891cae44b
commit
aa0607e1cb
1 changed files with 8 additions and 2 deletions
10
eat.el
10
eat.el
|
@ -5234,7 +5234,7 @@ PROGRAM can be a shell command."
|
|||
(define-key map [remap eshell-toggle-direct-send] ; C-c M-d
|
||||
#'eat-eshell-char-mode)
|
||||
map)
|
||||
"Keymap for Eat Eshell when no process is running.")
|
||||
"Keymap for Eat Eshell \"emacs\" mode.")
|
||||
|
||||
(defvar eat-eshell-semi-char-mode-map
|
||||
(let ((map (eat-term-make-keymap
|
||||
|
@ -5260,6 +5260,11 @@ PROGRAM can be a shell command."
|
|||
map)
|
||||
"Keymap for Eat Eshell char mode.")
|
||||
|
||||
(define-minor-mode eat--eshell-process-running-mode
|
||||
"Minor mode for \"emacs\" mode keymap when process is running."
|
||||
:interactive nil
|
||||
:keymap eat-eshell-emacs-mode-map)
|
||||
|
||||
(define-minor-mode eat--eshell-semi-char-mode
|
||||
"Minor mode for semi-char mode keymap."
|
||||
:interactive nil
|
||||
|
@ -5381,6 +5386,7 @@ PROGRAM can be a shell command."
|
|||
(eat-term-redisplay eat--terminal)
|
||||
(setq-local eshell-output-filter-functions
|
||||
'(eat--eshell-output-filter))
|
||||
(eat--eshell-process-running-mode +1)
|
||||
(eat-eshell-semi-char-mode)))
|
||||
|
||||
(defun eat--eshell-cleanup ()
|
||||
|
@ -5403,6 +5409,7 @@ PROGRAM can be a shell command."
|
|||
(kill-local-variable 'eshell-output-filter-functions)
|
||||
(eat--eshell-semi-char-mode -1)
|
||||
(eat--eshell-char-mode -1)
|
||||
(eat--eshell-process-running-mode -1)
|
||||
(setq buffer-read-only nil))))
|
||||
|
||||
(declare-function eshell-output-filter "esh-mode" (process string))
|
||||
|
@ -5553,7 +5560,6 @@ sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
|
|||
(define-minor-mode eat--eshell-local-mode
|
||||
"Toggle Eat terminal emulation is Eshell."
|
||||
:interactive nil
|
||||
:keymap eat-eshell-emacs-mode-map
|
||||
(let ((locals '(cursor-type
|
||||
glyphless-char-display
|
||||
track-mouse
|
||||
|
|
Loading…
Add table
Reference in a new issue