# HG changeset patch # User John Wiegley # Date 1042182074 0 # Node ID c814bafa1987e506a9e1c2b5e130d57ee75e06d3 # Parent 9313ae7d2d5bb3dc81143300523901ac48db76a3 (pcomplete-termination-string): Added a variable for modifying the string which is inserted after a completion or expansion using pcomplete. diff -r 9313ae7d2d5b -r c814bafa1987 lisp/pcomplete.el --- a/lisp/pcomplete.el Fri Jan 10 07:00:59 2003 +0000 +++ b/lisp/pcomplete.el Fri Jan 10 07:01:14 2003 +0000 @@ -311,6 +311,16 @@ :type 'boolean :group 'pcomplete) +(defcustom pcomplete-termination-string " " + "*A string that is inserted after any completion or expansion. +This is usually a space character, useful when completing lists of +words separated by spaces. However, if your list uses a different +separator character, or if the completion occurs in a word that is +already terminated by a character, this variable should be locally +modified to be an empty string, or the desired separation string." + :type 'string + :group 'pcomplete) + ;;; Internal Variables: ;; for cycling completion support @@ -418,7 +428,7 @@ (unless (pcomplete-insert-entry "" (car pcomplete-current-completions) t pcomplete-last-completion-raw) - (insert-and-inherit " ")) + (insert-and-inherit pcomplete-termination-string)) (setq pcomplete-current-completions (cdr pcomplete-current-completions)))))) @@ -1006,7 +1016,7 @@ (let (space-added) (when (and (not (memq (char-before) pcomplete-suffix-list)) addsuffix) - (insert-and-inherit " ") + (insert-and-inherit pcomplete-termination-string) (setq space-added t)) (setq pcomplete-last-completion-length (- (point) here) pcomplete-last-completion-stub stub)