[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27158: 25.2; Eliminating old usage of completing-read from built-in

From: Dmitry Gutov
Subject: bug#27158: 25.2; Eliminating old usage of completing-read from built-in files
Date: Thu, 1 Jun 2017 23:53:28 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0

On 6/1/17 5:57 PM, Drew Adams wrote:

`completing-read-function' needs to have the same signature
as `completing-read'.

I am the one who requested `completing-read-function' and
pushed to have it added to Emacs.

Thank you for that, but that doesn't mean it can't ever change.

Its purpose is to easily
let you change the _complete_ behavior of `completing-read',
just by binding a variable.


That requires passing it exactly the same arguments, to do
as it pleases with them.

No, it does not require that.

If, as in your case, it wants to
act as if DEF were in fact `(or DEF "")', it can do that.

It _already is_, according to the contract of completing-read. And that is the problem.

Changing the signature of `completing-read-function' in the
way you suggest makes all uses of `completing-read-function'
follow the path you've outlined for `ido-ubiquitous-mode'.

Nope. Like I said, the behavior of completing-read will not change.

completing-read-function will change, but just a little. With the new benefit that it's now aware of whether the caller wants to have a default value or not.

And no need.  You don't need that, to make your mode do
what you want.  If you disagree, please show da codez: a
simple example that doesn't work and for which you see no
possible solution.

The code is pointless here. Just read this again:


Obviously not. Also not when it's not installed, in case you
were wondering.

In that case, it's obvious that you can do whatever you need
inside the mode.


There is a reason for the DEF argument, a reason for it to
be optional, and a reason for its default value to be "".
All of which I've gone over.

Err, no. You didn't.

DEF was even expanded several releases ago, to allow a
value that is a list of default values.  Those too likely
don't fit your narrow use case.  Default values are
intentionally not completion candidates.  And yes, in
general they are useful, even if not for your use case
of `completing-read'.

Nobody is taking DEF away.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]