summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-cmpl.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell/em-cmpl.el')
-rw-r--r--lisp/eshell/em-cmpl.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index b4c86e39e86..4705adbae19 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -451,11 +451,15 @@ to writing a completion function."
(all-completions filename obarray 'functionp))
completions)))))))
-(defun eshell-pcomplete ()
+(defun eshell-pcomplete (&optional interactively)
"Eshell wrapper for `pcomplete'."
- (interactive)
+ (interactive "p")
+ ;; Pretend to be pcomplete so that cycling works (bug#13293).
+ (setq this-command 'pcomplete)
(condition-case nil
- (pcomplete)
+ (if interactively
+ (call-interactively 'pcomplete)
+ (pcomplete))
(text-read-only (completion-at-point)))) ; Workaround for bug#12838.
(provide 'em-cmpl)