aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2013-09-12 16:38:35 -0400
committerStefan Monnier2013-09-12 16:38:35 -0400
commit51e14f13f084bc41b863e5cd0308f5fd7da23fff (patch)
tree38d26590429f2d79ef9b87770aa23c7194218fcf
parent379add74c2635c38ee43f4e649a7d7aa12e03485 (diff)
downloademacs-51e14f13f084bc41b863e5cd0308f5fd7da23fff.tar.gz
emacs-51e14f13f084bc41b863e5cd0308f5fd7da23fff.zip
* eshell/em-cmpl.el: Undo accidental part of last commit.
-rw-r--r--lisp/eshell/em-cmpl.el20
1 files changed, 16 insertions, 4 deletions
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index fe7a79cf952..a940eb5cd36 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -297,16 +297,19 @@ to writing a completion function."
297 (define-key eshell-mode-map [(meta tab)] 'eshell-complete-lisp-symbol) 297 (define-key eshell-mode-map [(meta tab)] 'eshell-complete-lisp-symbol)
298 (define-key eshell-mode-map [(meta control ?i)] 'eshell-complete-lisp-symbol) 298 (define-key eshell-mode-map [(meta control ?i)] 'eshell-complete-lisp-symbol)
299 (define-key eshell-command-map [(meta ?h)] 'eshell-completion-help) 299 (define-key eshell-command-map [(meta ?h)] 'eshell-completion-help)
300 (define-key eshell-command-map [tab] 'pcomplete-expand-and-complete)
300 (define-key eshell-command-map [(control ?i)] 301 (define-key eshell-command-map [(control ?i)]
301 'pcomplete-expand-and-complete) 302 'pcomplete-expand-and-complete)
302 (define-key eshell-command-map [space] 'pcomplete-expand) 303 (define-key eshell-command-map [space] 'pcomplete-expand)
303 (define-key eshell-command-map [? ] 'pcomplete-expand) 304 (define-key eshell-command-map [? ] 'pcomplete-expand)
304 (define-key eshell-mode-map [(control ?i)] 'pcomplete) 305 (define-key eshell-mode-map [tab] 'eshell-pcomplete)
306 (define-key eshell-mode-map [(control ?i)] 'eshell-pcomplete)
305 (add-hook 'completion-at-point-functions 307 (add-hook 'completion-at-point-functions
306 #'pcomplete-completions-at-point nil t) 308 #'pcomplete-completions-at-point nil t)
307 ;; jww (1999-10-19): Will this work on anything but X? 309 ;; jww (1999-10-19): Will this work on anything but X?
308 (define-key eshell-mode-map (if (featurep 'xemacs) [iso-left-tab] [backtab]) 310 (if (featurep 'xemacs)
309 'pcomplete-reverse) 311 (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse)
312 (define-key eshell-mode-map [backtab] 'pcomplete-reverse))
310 (define-key eshell-mode-map [(meta ??)] 'pcomplete-list)) 313 (define-key eshell-mode-map [(meta ??)] 'pcomplete-list))
311 314
312(defun eshell-completion-command-name () 315(defun eshell-completion-command-name ()
@@ -455,7 +458,16 @@ to writing a completion function."
455 (all-completions filename obarray 'functionp)) 458 (all-completions filename obarray 'functionp))
456 completions))))))) 459 completions)))))))
457 460
458(define-obsolete-function-alias 'eshell-pcomplete 'completion-at-point) 461(defun eshell-pcomplete (&optional interactively)
462 "Eshell wrapper for `pcomplete'."
463 (interactive "p")
464 ;; Pretend to be pcomplete so that cycling works (bug#13293).
465 (setq this-command 'pcomplete)
466 (condition-case nil
467 (if interactively
468 (call-interactively 'pcomplete)
469 (pcomplete))
470 (text-read-only (completion-at-point)))) ; Workaround for bug#12838.
459 471
460(provide 'em-cmpl) 472(provide 'em-cmpl)
461 473