Subject: bug#8926: 24.0.50; pcomplete regression

From: Stefan Monnier <[email-masked]>
Date: Sun, 26 Jun 2011 21:18:13 -0400

>> in emacs-24 i notice a regression with pcomplete:
>> 
>> M-x eshell
>> 
>> cd do
>> 
>> M-: (pcomplete-completions)
>> => doesn't return a list of directories starting with "do" but an elisp
>> object unusable.
>> 
>> In emacs-23 a list is returned as expected.
>> 
>> However if i do:
>> 
>> M-x eshell
>> 
>> cd
>> 
>> M-: (pcomplete-completions)
>> 
>> I have a list of commands starting with "cd" as expected.

> Note that loading the old file of emacs-23 here in emacs-24 make
> pcomplete work as expected.

Yup.  Because among the various completion cases, the case for "files"
used to return a list and now returns a function.  Both are valid
completion tables.  Any caller of pcomplete-completions should expect to
receive a completion table and not just a list of strings.  It may very
well receive a list of strings (which is one kind of completion table),
but it may just as well receive something else.

        Stefan