aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorStefan Monnier2012-11-19 14:22:07 -0500
committerStefan Monnier2012-11-19 14:22:07 -0500
commit93b050412adab7512b7ebc77077fdbbe72730114 (patch)
tree94119c77c5403f12b096db6529b0bb2dc5fce2a4 /lisp/eshell
parent88c4a13c3b573e0fa844c88ab89765ef308c267e (diff)
downloademacs-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.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-cmpl.el8
1 files changed, 5 insertions, 3 deletions
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