1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

* lisp/eshell/em-cmpl.el (eshell-pcomplete): Refine fix for bug#12838:

Fallback on completion-at-point rather than
pcomplete-expand-and-complete, and only if pcomplete actually failed.
(eshell-cmpl-initialize): Setup completion-at-point.
* lisp/pcomplete.el (pcomplete--entries): Obey pcomplete-ignore-case.
This commit is contained in:
Stefan Monnier 2012-11-19 14:22:07 -05:00
parent 88c4a13c3b
commit 93b050412a
3 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,12 @@
2012-11-19 Stefan Monnier <monnier@iro.umontreal.ca>
* eshell/em-cmpl.el (eshell-pcomplete): Refine fix for bug#12838:
Fallback on completion-at-point rather than
pcomplete-expand-and-complete, and only if pcomplete actually failed.
(eshell-cmpl-initialize): Setup completion-at-point.
* pcomplete.el (pcomplete--entries): Obey pcomplete-ignore-case.
* emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.
2012-11-19 Michael Albinus <michael.albinus@gmx.de>

View File

@ -297,6 +297,8 @@ to writing a completion function."
(define-key eshell-command-map [? ] 'pcomplete-expand)
(define-key eshell-mode-map [tab] 'eshell-pcomplete)
(define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete)
(add-hook 'completion-at-point-functions
#'pcomplete-completions-at-point nil t)
;; jww (1999-10-19): Will this work on anything but X?
(if (featurep 'xemacs)
(define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse)
@ -452,9 +454,9 @@ to writing a completion function."
(defun eshell-pcomplete ()
"Eshell wrapper for `pcomplete'."
(interactive)
(if eshell-cmpl-ignore-case
(pcomplete-expand-and-complete) ; hack workaround for bug#12838
(pcomplete)))
(condition-case nil
(pcomplete)
(text-read-only (completion-at-point)))) ; Workaround for bug#12838.
(provide 'em-cmpl)

View File

@ -833,7 +833,8 @@ this is `comint-dynamic-complete-functions'."
. ,(lambda (comps)
(sort comps pcomplete-compare-entry-function)))
,@(cdr (completion-file-name-table s p a)))
(let ((completion-ignored-extensions nil))
(let ((completion-ignored-extensions nil)
(completion-ignore-case pcomplete-ignore-case))
(completion-table-with-predicate
#'comint-completion-file-name-table pred 'strict s p a))))))