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 | 1c6d8c761fd19c6a277db1a183e65e16d4094421 (patch) | |
tree | 01ab00d421ae2dd30c7e08b1e779411ce264cc82 /lisp/shell.el | |
parent | 9ea9f8de990103dee8d59b4059a89cc6f3abb5ab (diff) | |
download | emacs-1c6d8c761fd19c6a277db1a183e65e16d4094421.tar.gz emacs-1c6d8c761fd19c6a277db1a183e65e16d4094421.tar.bz2 emacs-1c6d8c761fd19c6a277db1a183e65e16d4094421.zip |
* 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) |