Use 'setf' + 'plist-get' instead of 'plist-put'
* eat.el (eat--eshell-adjust-make-process-args): Use (setf (plist-get ...) ...) instead of 'plist-put' without taking the result, which is not guaranteed to always work.
This commit is contained in:
parent
a736f08ea9
commit
0e82988d6f
1 changed files with 9 additions and 10 deletions
19
eat.el
19
eat.el
|
@ -6129,17 +6129,16 @@ modify its argument to change the filter, the sentinel and invoke
|
||||||
(expand-file-name command))
|
(expand-file-name command))
|
||||||
args))))
|
args))))
|
||||||
(apply make-process plist)
|
(apply make-process plist)
|
||||||
(plist-put plist :filter #'eat--eshell-filter)
|
(setf (plist-get plist :filter) #'eat--eshell-filter
|
||||||
(plist-put plist :sentinel #'eat--eshell-sentinel)
|
(plist-get plist :sentinel) #'eat--eshell-sentinel
|
||||||
(plist-put
|
(plist-get plist :command)
|
||||||
plist :command
|
`("/usr/bin/env" "sh" "-c"
|
||||||
`("/usr/bin/env" "sh" "-c"
|
,(format "stty -nl echo rows %d columns %d \
|
||||||
,(format "stty -nl echo rows %d columns %d \
|
|
||||||
sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
|
sane 2>%s ; if [ $1 = .. ]; then shift; fi; exec \"$@\""
|
||||||
(window-text-height)
|
(window-text-height)
|
||||||
(window-max-chars-per-line) null-device)
|
(window-max-chars-per-line) null-device)
|
||||||
".."
|
".."
|
||||||
,@(plist-get plist :command)))
|
,@(plist-get plist :command)))
|
||||||
(let ((process (apply make-process plist)))
|
(let ((process (apply make-process plist)))
|
||||||
(eat--eshell-setup-proc-and-term process)
|
(eat--eshell-setup-proc-and-term process)
|
||||||
process)))))
|
process)))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue