diff options
| author | Stefan Monnier | 2012-11-19 14:22:07 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2012-11-19 14:22:07 -0500 |
| commit | 93b050412adab7512b7ebc77077fdbbe72730114 (patch) | |
| tree | 94119c77c5403f12b096db6529b0bb2dc5fce2a4 | |
| parent | 88c4a13c3b573e0fa844c88ab89765ef308c267e (diff) | |
| download | emacs-93b050412adab7512b7ebc77077fdbbe72730114.tar.gz emacs-93b050412adab7512b7ebc77077fdbbe72730114.zip | |
* 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.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/eshell/em-cmpl.el | 8 | ||||
| -rw-r--r-- | lisp/pcomplete.el | 3 |
3 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d88aac7bc61..e2299df822f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2012-11-19 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2012-11-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * eshell/em-cmpl.el (eshell-pcomplete): Refine fix for bug#12838: | ||
| 4 | Fallback on completion-at-point rather than | ||
| 5 | pcomplete-expand-and-complete, and only if pcomplete actually failed. | ||
| 6 | (eshell-cmpl-initialize): Setup completion-at-point. | ||
| 7 | |||
| 8 | * pcomplete.el (pcomplete--entries): Obey pcomplete-ignore-case. | ||
| 9 | |||
| 3 | * emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib. | 10 | * emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib. |
| 4 | 11 | ||
| 5 | 2012-11-19 Michael Albinus <michael.albinus@gmx.de> | 12 | 2012-11-19 Michael Albinus <michael.albinus@gmx.de> |
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index aa8aae2d245..b4c86e39e86 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el | |||
| @@ -297,6 +297,8 @@ to writing a completion function." | |||
| 297 | (define-key eshell-command-map [? ] 'pcomplete-expand) | 297 | (define-key eshell-command-map [? ] 'pcomplete-expand) |
| 298 | (define-key eshell-mode-map [tab] 'eshell-pcomplete) | 298 | (define-key eshell-mode-map [tab] 'eshell-pcomplete) |
| 299 | (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete) | 299 | (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete) |
| 300 | (add-hook 'completion-at-point-functions | ||
| 301 | #'pcomplete-completions-at-point nil t) | ||
| 300 | ;; jww (1999-10-19): Will this work on anything but X? | 302 | ;; jww (1999-10-19): Will this work on anything but X? |
| 301 | (if (featurep 'xemacs) | 303 | (if (featurep 'xemacs) |
| 302 | (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse) | 304 | (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse) |
| @@ -452,9 +454,9 @@ to writing a completion function." | |||
| 452 | (defun eshell-pcomplete () | 454 | (defun eshell-pcomplete () |
| 453 | "Eshell wrapper for `pcomplete'." | 455 | "Eshell wrapper for `pcomplete'." |
| 454 | (interactive) | 456 | (interactive) |
| 455 | (if eshell-cmpl-ignore-case | 457 | (condition-case nil |
| 456 | (pcomplete-expand-and-complete) ; hack workaround for bug#12838 | 458 | (pcomplete) |
| 457 | (pcomplete))) | 459 | (text-read-only (completion-at-point)))) ; Workaround for bug#12838. |
| 458 | 460 | ||
| 459 | (provide 'em-cmpl) | 461 | (provide 'em-cmpl) |
| 460 | 462 | ||
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 9e55976a8bd..13cf7356e7f 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -833,7 +833,8 @@ this is `comint-dynamic-complete-functions'." | |||
| 833 | . ,(lambda (comps) | 833 | . ,(lambda (comps) |
| 834 | (sort comps pcomplete-compare-entry-function))) | 834 | (sort comps pcomplete-compare-entry-function))) |
| 835 | ,@(cdr (completion-file-name-table s p a))) | 835 | ,@(cdr (completion-file-name-table s p a))) |
| 836 | (let ((completion-ignored-extensions nil)) | 836 | (let ((completion-ignored-extensions nil) |
| 837 | (completion-ignore-case pcomplete-ignore-case)) | ||
| 837 | (completion-table-with-predicate | 838 | (completion-table-with-predicate |
| 838 | #'comint-completion-file-name-table pred 'strict s p a)))))) | 839 | #'comint-completion-file-name-table pred 'strict s p a)))))) |
| 839 | 840 | ||