From 5ee1772e2c5cff56ff1825b79acdd67dc142bf49 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 31 Dec 2012 13:28:33 -0800 Subject: [PATCH] * eshell/em-cmpl.el (eshell-pcomplete): More thoroughly imitate pcomplete. Fixes: debbugs:13293 --- lisp/ChangeLog | 3 +++ lisp/eshell/em-cmpl.el | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a7fc8f7fd4..49496efec69 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-12-31 Glenn Morris + * eshell/em-cmpl.el (eshell-pcomplete): + More thoroughly imitate pcomplete. (Bug#13293) + * files.el (parse-colon-path): Doc fix. (Bug#12351) Return nil for empty path elements. (Bug#13296) 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) -- 2.11.4.GIT