From: Glenn Morris Date: Mon, 31 Dec 2012 21:28:33 +0000 (-0800) Subject: * eshell/em-cmpl.el (eshell-pcomplete): More thoroughly imitate pcomplete. X-Git-Tag: emacs-24.2.92~56 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/5ee1772e2c5cff56ff1825b79acdd67dc142bf49 * eshell/em-cmpl.el (eshell-pcomplete): More thoroughly imitate pcomplete. Fixes: debbugs:13293 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a7fc8f7fd..49496efec6 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 b4c86e39e8..4705adbae1 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)