Function: pcomplete-comint-setup
pcomplete-comint-setup is an autoloaded and byte-compiled function
defined in pcomplete.el.gz.
Signature
(pcomplete-comint-setup COMPLETEF-SYM)
Documentation
Setup a comint buffer to use pcomplete.
COMPLETEF-SYM should be the symbol where the
dynamic-complete-functions are kept. For comint mode itself,
this is comint-dynamic-complete-functions.
Source Code
;; Defined in /usr/src/emacs/lisp/pcomplete.el.gz
;;;###autoload
(defun pcomplete-comint-setup (completef-sym)
"Setup a comint buffer to use pcomplete.
COMPLETEF-SYM should be the symbol where the
dynamic-complete-functions are kept. For comint mode itself,
this is `comint-dynamic-complete-functions'."
(setq-local pcomplete-parse-arguments-function
#'pcomplete-parse-comint-arguments)
(add-hook 'completion-at-point-functions
#'pcomplete-completions-at-point nil 'local)
(set (make-local-variable completef-sym)
(copy-sequence (symbol-value completef-sym)))
(let* ((funs (symbol-value completef-sym))
(elem (or (memq 'comint-filename-completion funs)
(memq 'shell-filename-completion funs)
(memq 'shell-dynamic-complete-filename funs)
(memq 'comint-dynamic-complete-filename funs))))
(if elem
(setcar elem 'pcomplete)
(add-to-list completef-sym 'pcomplete))))