]> code.delx.au - gnu-emacs/commitdiff
* eshell/em-cmpl.el (eshell-pcomplete): More thoroughly imitate pcomplete.
authorGlenn Morris <rgm@gnu.org>
Mon, 31 Dec 2012 21:28:33 +0000 (13:28 -0800)
committerGlenn Morris <rgm@gnu.org>
Mon, 31 Dec 2012 21:28:33 +0000 (13:28 -0800)
Fixes: debbugs:13293
lisp/ChangeLog
lisp/eshell/em-cmpl.el

index 2a7fc8f7fd4641a30a7b4614a8bce1b25d0f0cf9..49496efec69224ac9af3db27d9d8e18f1f2ae414 100644 (file)
@@ -1,5 +1,8 @@
 2012-12-31  Glenn Morris  <rgm@gnu.org>
 
+       * 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)
 
index b4c86e39e86a2b1a5f296c501dee400c58477de9..4705adbae196ee383d98ff78f148f6dc4b8420f4 100644 (file)
@@ -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)