branch: elpa/bash-completion
commit 3bd30eea3f4bd3dd5183712ca2cb553467faf498
Author: montag451 <[email protected]>
Commit: montag451 <[email protected]>
Use the correct function to send string to completion process
---
bash-completion.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/bash-completion.el b/bash-completion.el
index 6c294a95da..2b46b63cd2 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -1355,14 +1355,18 @@ Return the status code of the command, as a number."
(comint-preoutput-filter-functions
(if bash-completion-use-separate-processes
comint-preoutput-filter-functions
- '(bash-completion--output-filter))))
+ '(bash-completion--output-filter)))
+ (send-string (if bash-completion-use-separate-processes
+ #'process-send-string
+ #'comint-send-string)))
(with-current-buffer (bash-completion--get-buffer process)
(erase-buffer)
- (comint-send-string process (concat
- commandline
- (when (not
bash-completion-use-separate-processes)
- "; echo -e \"\v$?\"; history -d -1")
- "\n"))
+ (funcall send-string process
+ (concat
+ commandline
+ (when (not bash-completion-use-separate-processes)
+ "; echo -e \"\v$?\"; history -d -1")
+ "\n"))
(unless (bash-completion--wait-for-prompt process prompt-regexp timeout)
(error (concat
"Timeout while waiting for an answer from "