Refactor 'eat--eshell-adjust-make-process-args'
* eat.el (eat--eshell-adjust-make-process-args): Move the 'add-hook' out of 'unwind-protect'.
This commit is contained in:
parent
162ec61f3d
commit
559c9c362c
1 changed files with 41 additions and 42 deletions
13
eat.el
13
eat.el
|
@ -5543,9 +5543,8 @@ Disable terminal emulation?")))
|
|||
(set-process-filter proc #'eat--eshell-filter)
|
||||
(set-process-sentinel proc #'eat--eshell-sentinel)
|
||||
(eat--eshell-setup-proc-and-term proc))))
|
||||
(unwind-protect
|
||||
(progn
|
||||
(add-hook 'eshell-exec-hook hook 99)
|
||||
(unwind-protect
|
||||
(cond
|
||||
;; Emacs 29 and above.
|
||||
((>= emacs-major-version 29)
|
||||
|
@ -5562,8 +5561,8 @@ Disable terminal emulation?")))
|
|||
(apply make-process plist)
|
||||
(setf (plist-get plist :command)
|
||||
`("/usr/bin/env" "sh" "-c"
|
||||
,(format "stty -nl echo rows %d \
|
||||
columns %d sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
|
||||
,(format "stty -nl echo rows %d columns\
|
||||
%d sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
|
||||
(floor (window-screen-lines))
|
||||
(window-max-chars-per-line)
|
||||
null-device)
|
||||
|
@ -5579,13 +5578,13 @@ columns %d sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
|
|||
(lambda (name buffer &rest command)
|
||||
(apply start-file-process name buffer
|
||||
"/usr/bin/env" "sh" "-c"
|
||||
(format "stty -nl echo rows %d columns \
|
||||
%d sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
|
||||
(format "stty -nl echo rows %d columns %d \
|
||||
sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
|
||||
(floor (window-screen-lines))
|
||||
(window-max-chars-per-line)
|
||||
null-device)
|
||||
".." command))))
|
||||
(funcall fn command args)))))
|
||||
(funcall fn command args))))
|
||||
(remove-hook 'eshell-exec-hook hook)))))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue