summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-11-14 23:59:46 -0800
committerGlenn Morris <rgm@gnu.org>2012-11-14 23:59:46 -0800
commit17c083ac218b2a560b84a11df22366c0b9f7b636 (patch)
treebcc42f65ce1f70355a11eef4266e4fe0f244e8e5 /lisp
parentbde3c6c0f79ab814e12ea0f04b06625f91f5cd52 (diff)
downloademacs-17c083ac218b2a560b84a11df22366c0b9f7b636.tar.gz
* 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')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/eshell/em-cmpl.el11
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e53b667b2b2..74981d0c241 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2012-11-15 Glenn Morris <rgm@gnu.org>
+ * eshell/em-cmpl.el (eshell-pcomplete): New command. (Bug#12838)
+ (eshell-cmpl-initialize): Bind eshell-pcomplete to TAB, C-i.
+
* faces.el (face-underline-p): Doc fix. Handle :underline being
things other than `t' (a string, a list).
(face-inverse-video-p): Doc fix.
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."
'pcomplete-expand-and-complete)
(define-key eshell-command-map [space] 'pcomplete-expand)
(define-key eshell-command-map [? ] 'pcomplete-expand)
- (define-key eshell-mode-map [tab] 'pcomplete)
- (define-key eshell-mode-map [(control ?i)] 'pcomplete)
+ (define-key eshell-mode-map [tab] 'eshell-pcomplete)
+ (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete)
;; jww (1999-10-19): Will this work on anything but X?
(if (featurep 'xemacs)
(define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse)
@@ -449,6 +449,13 @@ to writing a completion function."
(all-completions filename obarray 'functionp))
completions)))))))
+(defun eshell-pcomplete ()
+ "Eshell wrapper for `pcomplete'."
+ (interactive)
+ (if eshell-cmpl-ignore-case
+ (pcomplete-expand-and-complete) ; hack workaround for bug#12838
+ (pcomplete)))
+
(provide 'em-cmpl)
;; Local Variables: