Fix incompatiblity with Eshell on Emacs 28

* eat.el (eat--eshell-setup-proc-and-term): Set
'eat--input-process' terminal parameter on Emacs 28.
* eat.el (eat-eshell-mode): Don't add advice
'eat--eshell-set-input-process' on Emacs 28.
This commit is contained in:
Akib Azmain Turja 2023-03-21 20:22:11 +06:00
parent 532f7221b7
commit 0586a84e52
No known key found for this signature in database
GPG key ID: 5535FCF54D88616B

13
eat.el
View file

@ -5747,6 +5747,9 @@ PROGRAM can be a shell command."
(setf (eat-term-set-cwd-function eat--terminal) #'eat--set-cwd)
(setf (eat-term-set-cmd-function eat--terminal) #'eat--set-cmd)
(setf (eat-term-parameter eat--terminal 'eat--process) proc)
(unless (>= emacs-major-version 29)
(setf (eat-term-parameter eat--terminal 'eat--input-process)
proc))
(setf (eat-term-parameter eat--terminal 'eat--output-process)
proc)
(when-let* ((window (get-buffer-window nil t)))
@ -6082,8 +6085,9 @@ symbol `buffer', in which case the point of current buffer is set."
,@eshell-variable-aliases-list))
(advice-add #'eshell-gather-process-output :around
#'eat--eshell-adjust-make-process-args)
(advice-add #'eshell-resume-eval :after
#'eat--eshell-set-input-process))
(when (>= emacs-major-version 29)
(advice-add #'eshell-resume-eval :after
#'eat--eshell-set-input-process)))
(t
(let ((buffers nil))
(setq eat-eshell-mode t)
@ -6115,8 +6119,9 @@ symbol `buffer', in which case the point of current buffer is set."
eshell-variable-aliases-list))
(advice-remove #'eshell-gather-process-output
#'eat--eshell-adjust-make-process-args)
(advice-remove #'eshell-resume-eval
#'eat--eshell-set-input-process))))
(when (>= emacs-major-version 29)
(advice-remove #'eshell-resume-eval
#'eat--eshell-set-input-process)))))
;;;; Eshell Visual Command Handling.