diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-06-17 14:52:46 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-06-17 14:52:46 -0400 |
commit | d0e41a73278e4236221699641c86d335564148b9 (patch) | |
tree | abd539928c67f5a02347cf4e1703e4b98a742b67 /lisp/shell.el | |
parent | 6825d233fb3c0899d280a9621c7b232bcae44552 (diff) | |
download | emacs-d0e41a73278e4236221699641c86d335564148b9.tar.gz |
* lisp/pcomplete.el: Convert to lexical binding and fix bug#8819.
(pcomplete-suffix-list): Mark as obsolete.
(pcomplete-completions-at-point): Capture pcomplete-norm-func and
pcomplete-seen in the closure.
(pcomplete-comint-setup): Setup completion-at-point as well.
(pcomplete--entries): New function.
(pcomplete--env-regexp): New var.
(pcomplete-entries): Rewrite to work with partial-completion and
without relying on pcomplete-suffix-list.
(pcomplete-pare-list): Remove, unused.
* lisp/shell.el (shell-completion-vars): Set pcomplete-termination-string
according to comint-completion-addsuffix.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r-- | lisp/shell.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 8a282e94160..de811543ba0 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -398,6 +398,12 @@ to `dirtrack-mode'." (set (make-local-variable 'pcomplete-parse-arguments-function) ;; FIXME: This function should be moved to shell.el. #'pcomplete-parse-comint-arguments) + (set (make-local-variable 'pcomplete-termination-string) + (cond ((not comint-completion-addsuffix) "") + ((stringp comint-completion-addsuffix) + comint-completion-addsuffix) + ((not (consp comint-completion-addsuffix)) " ") + (t (cdr comint-completion-addsuffix)))) ;; Don't use pcomplete's defaulting mechanism, rely on ;; shell-dynamic-complete-functions instead. (set (make-local-variable 'pcomplete-default-completion-function) #'ignore) |