diff options
| author | Glenn Morris | 2012-11-14 23:59:46 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-11-14 23:59:46 -0800 |
| commit | 17c083ac218b2a560b84a11df22366c0b9f7b636 (patch) | |
| tree | bcc42f65ce1f70355a11eef4266e4fe0f244e8e5 /lisp/eshell | |
| parent | bde3c6c0f79ab814e12ea0f04b06625f91f5cd52 (diff) | |
| download | emacs-17c083ac218b2a560b84a11df22366c0b9f7b636.tar.gz emacs-17c083ac218b2a560b84a11df22366c0b9f7b636.zip | |
* lisp/eshell/em-cmpl.el (eshell-pcomplete): New command.
(eshell-cmpl-initialize): Bind eshell-pcomplete to TAB, C-i.
Fixes: debbugs:12838
Diffstat (limited to 'lisp/eshell')
| -rw-r--r-- | lisp/eshell/em-cmpl.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index a67861e83a9..aa8aae2d245 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el | |||
| @@ -295,8 +295,8 @@ to writing a completion function." | |||
| 295 | 'pcomplete-expand-and-complete) | 295 | 'pcomplete-expand-and-complete) |
| 296 | (define-key eshell-command-map [space] 'pcomplete-expand) | 296 | (define-key eshell-command-map [space] 'pcomplete-expand) |
| 297 | (define-key eshell-command-map [? ] 'pcomplete-expand) | 297 | (define-key eshell-command-map [? ] 'pcomplete-expand) |
| 298 | (define-key eshell-mode-map [tab] 'pcomplete) | 298 | (define-key eshell-mode-map [tab] 'eshell-pcomplete) |
| 299 | (define-key eshell-mode-map [(control ?i)] 'pcomplete) | 299 | (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete) |
| 300 | ;; jww (1999-10-19): Will this work on anything but X? | 300 | ;; jww (1999-10-19): Will this work on anything but X? |
| 301 | (if (featurep 'xemacs) | 301 | (if (featurep 'xemacs) |
| 302 | (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse) | 302 | (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse) |
| @@ -449,6 +449,13 @@ to writing a completion function." | |||
| 449 | (all-completions filename obarray 'functionp)) | 449 | (all-completions filename obarray 'functionp)) |
| 450 | completions))))))) | 450 | completions))))))) |
| 451 | 451 | ||
| 452 | (defun eshell-pcomplete () | ||
| 453 | "Eshell wrapper for `pcomplete'." | ||
| 454 | (interactive) | ||
| 455 | (if eshell-cmpl-ignore-case | ||
| 456 | (pcomplete-expand-and-complete) ; hack workaround for bug#12838 | ||
| 457 | (pcomplete))) | ||
| 458 | |||
| 452 | (provide 'em-cmpl) | 459 | (provide 'em-cmpl) |
| 453 | 460 | ||
| 454 | ;; Local Variables: | 461 | ;; Local Variables: |