From 5a2ef230ef06b53fa1bbacad8996e6b98bf8d5f0 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 23 Feb 2002 21:34:25 +0000 Subject: [PATCH] Document how use new pcomplete completion facility. --- lisp/comint.el | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lisp/comint.el b/lisp/comint.el index 14d2579e32b..0c1dcbd7f52 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -56,6 +56,34 @@ ;; For further information on the standard derived modes (shell, ;; inferior-lisp, inferior-scheme, ...), see the relevant source files. + +;; To give your mode support for the programmable, dynamic completion +;; facility in "pcomplete.el", you should define two functions in the +;; following form, replacing with the prefix of your mode: + +;; (defvar -pcomplete-setup-p nil) +;; (defun -pcomplete () +;; "Cycle forwards through completions at point, using `pcomplete'. +;; This function merely invokes `pcomplete', after ensuring this buffer +;; is set up for it." +;; (interactive) +;; (unless (prog1 -pcomplete-setup-p +;; (setq -pcomplete-setup-p t)) +;; (pcomplete-comint-setup '-dynamic-complete-functions)) +;; (setq this-command 'pcomplete) +;; (call-interactively #'pcomplete)) + +;; (defun -pcomplete-reverse () +;; "Cycle backwards through completions at point, using `pcomplete'. +;; This function merely invokes `pcomplete-reverse', after ensuring this +;; buffer is set up for it." +;; (interactive) +;; (unless (prog1 -pcomplete-setup-p +;; (setq -pcomplete-setup-p t)) +;; (pcomplete-comint-setup '-dynamic-complete-functions)) +;; (setq this-command 'pcomplete-reverse) +;; (call-interactively #'pcomplete-reverse)) + ;; For hints on converting existing process modes (e.g., tex-mode, ;; background, dbx, gdb, kermit, prolog, telnet) to use comint-mode ;; instead of shell-mode, see the notes at the end of this file. -- 2.39.5