Skip to content

Commit 2721fd8

Browse files
committed
Use js-comint-get-process
1 parent f2f3d65 commit 2721fd8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

js-comint.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ This is used specifically to remove input used to trigger completion.
272272
CALLBACK allows chaining an action after clearing."
273273
(setq js-comint--discard-output (or callback 't))
274274
(comint-send-string
275-
(get-buffer-process (current-buffer))
275+
(js-comint-get-process)
276276
""))
277277

278278
(defun js-comint--get-completion (input-string callback)
@@ -285,11 +285,11 @@ CALLBACK allows chaining an action after clearing."
285285
;; 1st tab usually does common prefix
286286
(when (string-empty-p input-string)
287287
(comint-send-string
288-
(get-buffer-process (current-buffer))
288+
(js-comint-get-process)
289289
"\t"))
290290

291291
(comint-send-string
292-
(get-buffer-process (current-buffer))
292+
(js-comint-get-process)
293293
(format "%s\t" input-string)))
294294

295295
(defun js-comint--process-completion-output (completion prefix)
@@ -339,7 +339,7 @@ PREFIX is the original completion prefix string."
339339
;; Completions like Array. seem to need a second tab after the response
340340
(if (string-suffix-p "." js-comint--completion-prefix)
341341
(comint-send-string
342-
(get-buffer-process (current-buffer))
342+
(js-comint-get-process)
343343
"\t")
344344
;; Otherwise there was no match, so reset
345345
(setq js-comint--completion-prefix nil)
@@ -362,7 +362,7 @@ PREFIX is the original completion prefix string."
362362
(defun js-comint--current-input ()
363363
"Return current comint input relative to point.
364364
Nil if point is before the current prompt."
365-
(let ((pmark (process-mark (get-buffer-process (current-buffer)))))
365+
(let ((pmark (process-mark (js-comint-get-process))))
366366
(when (>= (point) (marker-position pmark))
367367
(buffer-substring pmark (point)))))
368368

0 commit comments

Comments
 (0)